Skip to content

Commit

Permalink
fsdev: Fix potential memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stweil authored and Anthony Liguori committed Jul 9, 2013
1 parent edb5092 commit b58c86e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fsdev/qemu-fsdev.c
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit b58c86e

Please sign in to comment.