]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Use image_set_name() only if name != NULL
authorPiotr Jaroszyński <p.jaroszynski@gmail.com>
Sun, 27 Mar 2011 18:19:47 +0000 (20:19 +0200)
committerMichael Brown <mcb30@ipxe.org>
Sun, 27 Mar 2011 18:22:45 +0000 (19:22 +0100)
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/usr/imgmgmt.c

index b1e8cbb1db9933e730dd267add4932eaa1d42796..dbf792b75c9083252b9b427976aedda6d99b2d3b 100644 (file)
@@ -154,7 +154,8 @@ int imgdownload ( struct uri *uri, const char *name, const char *cmdline,
                return -ENOMEM;
 
        /* Set image name */
-       image_set_name ( image, name );
+       if ( name )
+               image_set_name ( image, name );
 
        /* Set image URI */
        image_set_uri ( image, uri );