Fix allocation problem.

This commit is contained in:
Vreixo Formoso 2008-04-05 17:08:17 +02:00
parent 7b0da1ecd6
commit ccc7b0b58f

View File

@ -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;