Patchwork [v2,05/17] qapi: introduce OptsVisitor

login
register
mail settings
Submitter Laszlo Ersek
Date July 13, 2012, 11:09 p.m.
Message ID <5000AAAB.5000003@redhat.com>
Download mbox | patch
Permalink /patch/170983/
State New
Headers show

Comments

Laszlo Ersek - July 13, 2012, 11:09 p.m.
On 07/14/12 00:48, Laszlo Ersek wrote:

> You're right. opts_do_parse() makes an exception with "id" and doesn't
> call opt_set() for any occurrence of it. Would you accept the attached
> fix, split up and squashed into previous parts appropriately?

Sigh. I haven't looked at this code in a month, I obviously forgot to
release memory symmetrically. Sorry.

Laszlo
From 6ad7336a79f0187f4d0fba1f2f2eee64349cb137 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Sat, 14 Jul 2012 01:03:10 +0200
Subject: [PATCH 2/2] OptsVisitor: release "fake_id_opt" symmetrically


Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 qapi/opts-visitor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index a261cf3..ee6cf2b 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -130,6 +130,8 @@  opts_end_struct(Visitor *v, Error **errp)
     }
     g_hash_table_destroy(ov->unprocessed_opts);
     ov->unprocessed_opts = NULL;
+    g_free(ov->fake_id_opt);
+    ov->fake_id_opt = NULL;
 }