Message ID | 1423673410-15100-1-git-send-email-kraxel@redhat.com |
---|---|
State | New |
Headers | show |
On 2015/2/12 0:50, Gerd Hoffmann wrote: > Found by coverity. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/monitor.c b/monitor.c > index c3cc060..2c37953 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, > if (strcmp(protocol, "spice") == 0) { > if (!qemu_using_spice(&err)) { > qerror_report_err(err); > + error_free(err); > return -1; > } > > Hi, Gerd the err variable should be initialized to NULL. This leak had been fixed by: http://patchwork.ozlabs.org/patch/438696/ and v2: [PATCH v2] monitor: Fix missing err = NULL in client_migrate_info() Regards, -Gonglei
diff --git a/monitor.c b/monitor.c index c3cc060..2c37953 100644 --- a/monitor.c +++ b/monitor.c @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, if (strcmp(protocol, "spice") == 0) { if (!qemu_using_spice(&err)) { qerror_report_err(err); + error_free(err); return -1; }