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;
|
||||
|
||||
layout_file = parts;
|
||||
while ( ( ptr = strchr(layout_file, '%') ) )
|
||||
layout_file = ptr+1;
|
||||
if ( layout_file ) {
|
||||
while ( ( ptr = strchr(layout_file, '%') ) )
|
||||
layout_file = ptr+1;
|
||||
}
|
||||
|
||||
type = NULL;
|
||||
device = NULL;
|
||||
|
||||
Reference in new issue
Block a user