main: Fix NULL pointer derefernce
This commit is contained in:
1 parent
a5279bffaf
commit
df2340e48d
1 file changed
+4
-2
+4
-2
@@ -182,8 +182,10 @@ static void parse_image_arg(char * arg, struct image_list ** image_first) {
|
|||||||
*(parts++) = 0;
|
*(parts++) = 0;
|
||||||
|
|
||||||
layout_file = parts;
|
layout_file = parts;
|
||||||
while ( ( ptr = strchr(layout_file, '%') ) )
|
if ( layout_file ) {
|
||||||
layout_file = ptr+1;
|
while ( ( ptr = strchr(layout_file, '%') ) )
|
||||||
|
layout_file = ptr+1;
|
||||||
|
}
|
||||||
|
|
||||||
type = NULL;
|
type = NULL;
|
||||||
device = NULL;
|
device = NULL;
|
||||||
|
|||||||
Reference in new issue
Block a user