* [PATCH] tools/libxc/xc_linux_save.c
@ 2005-08-11 21:15 Jerone Young
2005-08-12 10:17 ` Bastian Blank
0 siblings, 1 reply; 3+ messages in thread
From: Jerone Young @ 2005-08-11 21:15 UTC (permalink / raw)
To: xen-devel
remove possible memory leaks.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
--- 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;
}
--
Jerone Young
IBM Linux Technology Center
jyoung5@us.ibm.com
512-838-1157 (T/L: 678-1157)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tools/libxc/xc_linux_save.c 2005-08-11 21:15 [PATCH] tools/libxc/xc_linux_save.c Jerone Young @ 2005-08-12 10:17 ` Bastian Blank 2005-08-12 12:48 ` Vincent Hanquez 0 siblings, 1 reply; 3+ messages in thread From: Bastian Blank @ 2005-08-12 10:17 UTC (permalink / raw) To: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 519 bytes --] On Thu, Aug 11, 2005 at 04:15:13PM -0500, Jerone Young wrote: > 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); free checks for null pointer themself. Bastian -- Extreme feminine beauty is always disturbing. -- Spock, "The Cloud Minders", stardate 5818.4 [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/libxc/xc_linux_save.c 2005-08-12 10:17 ` Bastian Blank @ 2005-08-12 12:48 ` Vincent Hanquez 0 siblings, 0 replies; 3+ messages in thread From: Vincent Hanquez @ 2005-08-12 12:48 UTC (permalink / raw) To: Bastian Blank; +Cc: xen-devel On Fri, Aug 12, 2005 at 12:17:59PM +0200, Bastian Blank wrote: > > + 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. -- Vincent Hanquez ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-12 12:48 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-08-11 21:15 [PATCH] tools/libxc/xc_linux_save.c Jerone Young 2005-08-12 10:17 ` Bastian Blank 2005-08-12 12:48 ` Vincent Hanquez
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.