tools/libxc/xc_linux_save.c
PATCH 1/1 tools/libxc/xc_linux_save.c
remove possible memory leaks.
Signed-off-by Jerone Young <[email protected]>
--- tools/libxc/xc_linux_save.c.old 2005-08-11 13:14:35.000000000
-0500
+++ tools/libxc/xc_linux_save.c 2005-08-11 13:25:08.000000000 -0500 @@ -1053,7 +1053,18 @@ int xc_linux_save(int xc_handle, int io_
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;
}Signature · 4 lines
Jerone Young IBM Linux Technology Center [email protected] 512-838-1157 (T/L: 678-1157)
Quoted 4 lines · Jerone Young
if (pfn_type != NULL) free(pfn_type);(quoted diff) +2
-0+ + if (pfn_batch != NULL)
Review
Quoted 10 lines
(quoted diff) +9
-0+ free(pfn_batch); + if (to_send != NULL) + free(to_send); + + if (to_fix != NULL) + free(to_fix); + + if (to_skip != NULL) + free(to_skip);
free checks for null pointer themself.
Bastian
Signature · 2 lines
Extreme feminine beauty is always disturbing. -- Spock, "The Cloud Minders", stardate 5818.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Bastian Blank
Review
Quoted 2 lines
(quoted diff) +2
-0+ if (to_skip != NULL) + free(to_skip);free checks for null pointer themself.
Indeed. I got a cleanup of thoses use, that i'm going to push later.
Signature · 1 line
Vincent Hanquez