summaryrefslogtreecommitdiffstats
path: root/src/core/image.c
diff options
context:
space:
mode:
authorPiotr Jaroszyński2010-07-08 15:54:55 +0200
committerMichael Brown2010-07-11 16:55:04 +0200
commitfd312fcc78c1741adb68f6f011d7fb39f0ad3979 (patch)
tree2736a7abec132c21437eff3b616cbce73c615833 /src/core/image.c
parent[pcnet32] Fix pcnet32_wio_reset() bug (diff)
downloadipxe-fd312fcc78c1741adb68f6f011d7fb39f0ad3979.tar.gz
ipxe-fd312fcc78c1741adb68f6f011d7fb39f0ad3979.tar.xz
ipxe-fd312fcc78c1741adb68f6f011d7fb39f0ad3979.zip
[image] Fix a memory leak in free_image()
image_set_cmdline() strdup()s cmdline, which free_image() doesn't clean up. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/image.c')
-rw-r--r--src/core/image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/image.c b/src/core/image.c
index f530cafd..ec4b4610 100644
--- a/src/core/image.c
+++ b/src/core/image.c
@@ -47,6 +47,7 @@ struct list_head images = LIST_HEAD_INIT ( images );
static void free_image ( struct refcnt *refcnt ) {
struct image *image = container_of ( refcnt, struct image, refcnt );
+ free ( image->cmdline );
uri_put ( image->uri );
ufree ( image->data );
image_put ( image->replacement );