All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerone Young <jyoung5@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] tools/libxc/xc_linux_save.c
Date: Thu, 11 Aug 2005 16:15:13 -0500	[thread overview]
Message-ID: <1123794913.3043.54.camel@thinkpad> (raw)

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)

             reply	other threads:[~2005-08-11 21:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11 21:15 Jerone Young [this message]
2005-08-12 10:17 ` [PATCH] tools/libxc/xc_linux_save.c Bastian Blank
2005-08-12 12:48   ` Vincent Hanquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1123794913.3043.54.camel@thinkpad \
    --to=jyoung5@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.