spice: fix memory leak
PATCH v2 1/1 spice: fix memory leak
Found by coverity.
Signed-off-by Gerd Hoffmann <[email protected]>
Reviewed-by Paolo Bonzini <[email protected]>
--- monitor.c | 1 + 1 file changed, 1 insertion(+)
monitor.c +1 -0
@@ -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 ; }
Signature · 1 line
1.8.3.1
Quoted 14 lines · Gerd Hoffmann
Found by coverity.
Signed-off-by Gerd Hoffmann <[email protected]>Reviewed-by Paolo Bonzini <[email protected]>--- monitor.c | 1 + 1 file changed, 1 insertion(+)monitor.c +0
-0
monitor.c static int client_migrate_info(Monitor *mon, const QDict *qdict, · line 1107
Quoted 7 lines
monitor.c +1
-0@@ -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