qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fsdev: Fix potential memory leak
@ 2013-06-16 10:02 Stefan Weil
  2013-07-02 20:35 ` Stefan Weil
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefan Weil @ 2013-06-16 10:02 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: Stefan Weil, qemu-devel

This leak was reported by cppcheck.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 fsdev/qemu-fsdev.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
index 6eaf36d..ccfec13 100644
--- a/fsdev/qemu-fsdev.c
+++ b/fsdev/qemu-fsdev.c
@@ -76,6 +76,8 @@ int qemu_fsdev_add(QemuOpts *opts)
 
     if (fsle->fse.ops->parse_opts) {
         if (fsle->fse.ops->parse_opts(opts, &fsle->fse)) {
+            g_free(fsle->fse.fsdev_id);
+            g_free(fsle);
             return -1;
         }
     }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-10 19:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-16 10:02 [Qemu-devel] [PATCH] fsdev: Fix potential memory leak Stefan Weil
2013-07-02 20:35 ` Stefan Weil
2013-07-07 17:15   ` Aneesh Kumar K.V
2013-07-07 19:41     ` Stefan Weil
2013-07-04  4:54 ` M. Mohan Kumar
2013-07-10 19:33 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).