Skip to contentSkip to conversation

monitor: Plug memory leak on QMP error

PATCH In review Markus Armbruster 3 participants 6 messages Oct 29, 2015 – Oct 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 monitor: Plug memory leak on QMP error

Leak introduced in commit 8a4f501..710aec9, v2.4.0.

---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)
monitor.c +1 -0
index 301a143..c59e85b 100644
@@ -3862,6 +3862,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
 err_out:
     monitor_protocol_emitter(mon, data, local_err);
     qobject_decref(data);
+    error_free(local_err);
     QDECREF(input);
     QDECREF(args);
 }
Signature · 1 line
2.4.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Markus Armbruster

Leak introduced in commit 8a4f501..710aec9, v2.4.0.

---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines
monitor.c +1 -0
index 301a143..c59e85b 100644
@@ -3862,6 +3862,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
 err_out:
     monitor_protocol_emitter(mon, data, local_err);
     qobject_decref(data);
+    error_free(local_err);
     QDECREF(input);
     QDECREF(args);
 }
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Reviewed-by on v1 1/1
#2 lore raw
In reply to Markus Armbruster
Quoted 3 lines · On Thu, 29 Oct 2015 12:15:09 +0100 Markus Armbruster <[email protected]> wrote:

Leak introduced in commit 8a4f501..710aec9, v2.4.0.

I think this can go through your tree?

Quoted 16 lines
---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)
monitor.c +1 -0
index 301a143..c59e85b 100644
@@ -3862,6 +3862,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
 err_out:
     monitor_protocol_emitter(mon, data, local_err);
     qobject_decref(data);
+    error_free(local_err);
     QDECREF(input);
     QDECREF(args);
 }
#4 lore raw
Quoted 9 lines · On Thu, 29 Oct 2015 17:23:43 +0100 Markus Armbruster <[email protected]> wrote:
Quoted 7 lines · Luiz Capitulino
Quoted 3 lines · On Thu, 29 Oct 2015 12:15:09 +0100 Markus Armbruster <[email protected]> wrote:

Leak introduced in commit 8a4f501..710aec9, v2.4.0.

Quoted 7 lines
Quoted 1 line

Thanks!

Quoted 1 line

I think this can go through your tree?

Yes, along with the json-streamer work.

Do you need my review for that one? It's been ages that I don't look at that code, I'm not sure it's going to be that worthwhile.

#5 lore raw
Quoted 14 lines · Luiz Capitulino
Quoted 11 lines · On Thu, 29 Oct 2015 17:23:43 +0100 Markus Armbruster <[email protected]> wrote:
Quoted 8 lines · Luiz Capitulino
Quoted 3 lines · On Thu, 29 Oct 2015 12:15:09 +0100 Markus Armbruster <[email protected]> wrote:

Leak introduced in commit 8a4f501..710aec9, v2.4.0.

Quoted 8 lines
Quoted 5 lines

Thanks!

Quoted 1 line

I think this can go through your tree?

Yes, along with the json-streamer work.

Do you need my review for that one? It's been ages that I don't look at that code, I'm not sure it's going to be that worthwhile.

Review is always welcome, but "need" is too strong. qobject/json* isn't your code anyway, and I got Eric's review already.