xf86drm: simplify drmMalloc/drmFree

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
main
Emil Velikov 2015-04-28 13:33:46 +01:00
parent 128344c2cf
commit d0e592d4e9
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}
/**