WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] tools/libxc/xc_linux_save.c

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] tools/libxc/xc_linux_save.c
From: Jerone Young <jyoung5@xxxxxxxxxx>
Date: Thu, 11 Aug 2005 16:15:13 -0500
Delivery-date: Thu, 11 Aug 2005 21:15:55 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
remove possible memory leaks.

Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>

--- 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@xxxxxxxxxx
512-838-1157 (T/L: 678-1157)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>