From ccc7b0b58fc30eb8926299a3964bf08853fc4e34 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Sat, 5 Apr 2008 17:08:17 +0200 Subject: [PATCH] Fix allocation problem. --- libisofs/fs_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index cbe991f..3387c65 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -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;