From: Piotr Jaroszyński Date: Thu, 8 Jul 2010 13:54:55 +0000 (+0200) Subject: [image] Fix a memory leak in free_image() X-Git-Tag: v1.20.1~2618 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd312fcc78c1741adb68f6f011d7fb39f0ad3979;p=thirdparty%2Fipxe.git [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 Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael Brown --- diff --git a/src/core/image.c b/src/core/image.c index f530cafd4..ec4b46106 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 );