Fix allocation problem.
This commit is contained in:
parent
7b0da1ecd6
commit
ccc7b0b58f
@ -2136,7 +2136,7 @@ int image_builder_create_node(IsoNodeBuilder *builder, IsoImage *image,
|
||||
free(name);
|
||||
return ret;
|
||||
}
|
||||
link = malloc(sizeof(IsoSymlink));
|
||||
link = calloc(1, sizeof(IsoSymlink));
|
||||
if (link == NULL) {
|
||||
free(name);
|
||||
return ISO_OUT_OF_MEM;
|
||||
@ -2154,7 +2154,7 @@ int image_builder_create_node(IsoNodeBuilder *builder, IsoImage *image,
|
||||
{
|
||||
/* source is an special file */
|
||||
IsoSpecial *special;
|
||||
special = malloc(sizeof(IsoSpecial));
|
||||
special = calloc(1, sizeof(IsoSpecial));
|
||||
if (special == NULL) {
|
||||
free(name);
|
||||
return ISO_OUT_OF_MEM;
|
||||
|
Loading…
Reference in New Issue
Block a user