mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
convert to zalloc
This commit is contained in:
parent
da3c785816
commit
1ccb6f9dc6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user