Navigation Menu

Skip to content

Commit

Permalink
[image] Fix a memory leak in free_image()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pjaroszynski authored and mcb30 committed Jul 11, 2010
1 parent ab14421 commit fd312fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/image.c
Expand Up @@ -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 );
Expand Down

0 comments on commit fd312fc

Please sign in to comment.