[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Memory leak in xc_linux_save, and uninitialised var
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID f507ca15ae003218b07c84aa390041d2316ed2bf # Parent 5ec5f6960507cf731a53beb593c1e18e538036b2 Memory leak in xc_linux_save, and uninitialised var in secpol_tool. Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx> diff -r 5ec5f6960507 -r f507ca15ae00 tools/libxc/xc_linux_save.c --- a/tools/libxc/xc_linux_save.c Thu Aug 11 21:52:22 2005 +++ b/tools/libxc/xc_linux_save.c Thu Aug 11 22:12:11 2005 @@ -429,7 +429,7 @@ - that should be sent this iteration (unless later marked as skip); - to skip this iteration because already dirty; - to fixup by sending at the end if not already resent; */ - unsigned long *to_send, *to_skip, *to_fix; + unsigned long *to_send = NULL, *to_skip = NULL, *to_fix = NULL; xc_shadow_control_stats_t stats; @@ -1054,6 +1054,18 @@ if (pfn_type != NULL) free(pfn_type); + if (pfn_batch != NULL) + free(pfn_batch); + + if (to_send != NULL) + free(to_send); + + if (to_fix != NULL) + free(to_fix); + + if (to_skip != NULL) + free(to_skip); + DPRINTF("Save exit rc=%d\n",rc); return !!rc; } diff -r 5ec5f6960507 -r f507ca15ae00 tools/security/secpol_tool.c --- a/tools/security/secpol_tool.c Thu Aug 11 21:52:22 2005 +++ b/tools/security/secpol_tool.c Thu Aug 11 22:12:11 2005 @@ -612,7 +612,7 @@ int main(int argc, char **argv) { - int acm_cmd_fd, ret; + int acm_cmd_fd, ret = 0; if (argc < 2) usage(argv[0]); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |