]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
convert to zalloc
authorHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 19:08:21 +0000 (21:08 +0200)
committerHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 19:08:21 +0000 (21:08 +0200)
src/core/image.c

index 08a129ffa700f86f53018e1af1146c570c7491d4..04bd083944e0b5eaa74aac4b6c9aa009272ae629 100644 (file)
@@ -62,9 +62,8 @@ static void free_image ( struct refcnt *refcnt ) {
 struct image * alloc_image ( void ) {
        struct image *image;
 
-       image = malloc ( sizeof ( *image ) );
+       image = zalloc ( sizeof ( *image ) );
        if ( image ) {
-               memset ( image, 0, sizeof ( *image ) );
                image->refcnt.free = free_image;
        }
        return image;