xf86drm: simplify drmMalloc/drmFree
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>main
parent
128344c2cf
commit
d0e592d4e9
|
@ -141,16 +141,12 @@ void *drmGetHashTable(void)
|
||||||
|
|
||||||
void *drmMalloc(int size)
|
void *drmMalloc(int size)
|
||||||
{
|
{
|
||||||
void *pt;
|
return calloc(1, size);
|
||||||
if ((pt = malloc(size)))
|
|
||||||
memset(pt, 0, size);
|
|
||||||
return pt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void drmFree(void *pt)
|
void drmFree(void *pt)
|
||||||
{
|
{
|
||||||
if (pt)
|
free(pt);
|
||||||
free(pt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue