Skip to contentSkip to conversation

spice: fix memory leak

PATCH Applied Gerd Hoffmann 3 participants 4 messages Feb 11, 2015 – Feb 16, 2015

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spice: fix memory leak

Found by coverity.

---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)
monitor.c +1 -0
index c3cc060..29d7e5b 100644
@@ -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(local_err);
             return -1;
         }
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Gerd Hoffmann

Found by coverity.

---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)
monitor.c +0 -0
index c3cc060..29d7e5b 100644

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(local_err);
             return -1;
         }
 
#3 lore raw
Quoted 1 line · Michael Tokarev

Applied to -trivial, thanks!

Er, nope, the right fix comes from Gonglei.

/mjt