]> git.proxmox.com Git - qemu.git/commitdiff
fsdev: Fix potential memory leak
authorStefan Weil <sw@weilnetz.de>
Sun, 16 Jun 2013 10:02:40 +0000 (12:02 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 9 Jul 2013 18:38:56 +0000 (13:38 -0500)
This leak was reported by cppcheck.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com>
Message-id: 1371376960-18192-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fsdev/qemu-fsdev.c

index 6eaf36dbfa291441ca448b82ed600191337ae85a..ccfec139ab2bf127b0f981d1f4631b5a8a21c594 100644 (file)
@@ -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;
         }
     }