[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:
parent
ab14421990
commit
fd312fcc78
@ -47,6 +47,7 @@ struct list_head images = LIST_HEAD_INIT ( images );
|
|||||||
static void free_image ( struct refcnt *refcnt ) {
|
static void free_image ( struct refcnt *refcnt ) {
|
||||||
struct image *image = container_of ( refcnt, struct image, refcnt );
|
struct image *image = container_of ( refcnt, struct image, refcnt );
|
||||||
|
|
||||||
|
free ( image->cmdline );
|
||||||
uri_put ( image->uri );
|
uri_put ( image->uri );
|
||||||
ufree ( image->data );
|
ufree ( image->data );
|
||||||
image_put ( image->replacement );
|
image_put ( image->replacement );
|
||||||
|
Reference in New Issue
Block a user