소스 검색

convert to zalloc

tags/v0.9.3
Holger Lubitz 18 년 전
부모
커밋
1ccb6f9dc6
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    2
      src/core/image.c

+ 1
- 2
src/core/image.c 파일 보기

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…
취소
저장