From d0e592d4e9b59d9cc185f1d63b3c1dd818e95098 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 28 Apr 2015 13:33:46 +0100 Subject: xf86drm: simplify drmMalloc/drmFree Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher --- xf86drm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index b5a174bd..2245f995 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -141,16 +141,12 @@ void *drmGetHashTable(void) void *drmMalloc(int size) { - void *pt; - if ((pt = malloc(size))) - memset(pt, 0, size); - return pt; + return calloc(1, size); } void drmFree(void *pt) { - if (pt) - free(pt); + free(pt); } /** -- cgit v1.2.3