diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2015-04-28 13:33:46 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-05-28 15:40:18 +0100 |
commit | d0e592d4e9b59d9cc185f1d63b3c1dd818e95098 (patch) | |
tree | b23317fa982e1d15a877b65929db2c7ea53c0003 | |
parent | 128344c2cf22385dedece5a3d774d3a24527d2de (diff) |
xf86drm: simplify drmMalloc/drmFree
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | xf86drm.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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); } /** |