cmd/gpt: avoid NULL check before free()
free() checks if its argument is NULL. Do not duplicate this in the calling code. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
ea5d3731b8
commit
b142d0ac19
@ -772,11 +772,9 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm,
|
||||
out:
|
||||
del_gpt_info();
|
||||
#ifdef CONFIG_RANDOM_UUID
|
||||
if (str_disk_guid)
|
||||
free(str_disk_guid);
|
||||
free(str_disk_guid);
|
||||
#endif
|
||||
if (new_partitions)
|
||||
free(new_partitions);
|
||||
free(new_partitions);
|
||||
free(partitions_list);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user