Browse Source

[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>
tags/v1.20.1
Piotr Jaroszyński 14 years ago
parent
commit
fd312fcc78
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/core/image.c

+ 1
- 0
src/core/image.c View File

@@ -47,6 +47,7 @@ struct list_head images = LIST_HEAD_INIT ( images );
47 47
 static void free_image ( struct refcnt *refcnt ) {
48 48
 	struct image *image = container_of ( refcnt, struct image, refcnt );
49 49
 
50
+	free ( image->cmdline );
50 51
 	uri_put ( image->uri );
51 52
 	ufree ( image->data );
52 53
 	image_put ( image->replacement );

Loading…
Cancel
Save