Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
1ccb6f9dc6
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/core/image.c

+ 1
- 2
src/core/image.c View File

62
 struct image * alloc_image ( void ) {
62
 struct image * alloc_image ( void ) {
63
 	struct image *image;
63
 	struct image *image;
64
 
64
 
65
-	image = malloc ( sizeof ( *image ) );
65
+	image = zalloc ( sizeof ( *image ) );
66
 	if ( image ) {
66
 	if ( image ) {
67
-		memset ( image, 0, sizeof ( *image ) );
68
 		image->refcnt.free = free_image;
67
 		image->refcnt.free = free_image;
69
 	}
68
 	}
70
 	return image;
69
 	return image;

Loading…
Cancel
Save