Browse Source

[image] Use image_set_name() only if name != NULL

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Piotr Jaroszyński 13 years ago
parent
commit
ac8fc2a8e4
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/usr/imgmgmt.c

+ 2
- 1
src/usr/imgmgmt.c View File

@@ -154,7 +154,8 @@ int imgdownload ( struct uri *uri, const char *name, const char *cmdline,
154 154
 		return -ENOMEM;
155 155
 
156 156
 	/* Set image name */
157
-	image_set_name ( image, name );
157
+	if ( name )
158
+		image_set_name ( image, name );
158 159
 
159 160
 	/* Set image URI */
160 161
 	image_set_uri ( image, uri );

Loading…
Cancel
Save