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 <[email protected]>
Reviewed-by: M. Mohan Kumar <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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.