david/ipxe
Archived
1
0

[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>
This commit is contained in:
Piotr Jaroszyński 2010-07-08 15:54:55 +02:00 committed by Michael Brown
parent ab14421990
commit fd312fcc78

View File

@ -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 );