Skip to content

Commit

Permalink
device_tree: Fix potential memory leak
Browse files Browse the repository at this point in the history
cppcheck error report:

device_tree.c:156: error: Memory leak: dupname

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
  • Loading branch information
stweil authored and Stefan Hajnoczi committed Oct 26, 2011
1 parent d300854 commit bff39b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions device_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ int qemu_devtree_add_subnode(void *fdt, const char *name)
int retval;

if (!basename) {
g_free(dupname);
return -1;
}

Expand Down

0 comments on commit bff39b6

Please sign in to comment.