Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx> --- xf86drm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index f7c45f8..9cd0b02 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -140,16 +140,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); } /** -- 2.3.5 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel