Commit f5540257 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

dix/dispatch: fix a small memory leak

parent 6f954bb7
......@@ -4150,7 +4150,10 @@ AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
pScreen->devPrivates = (DevUnion *)calloc(sizeof(DevUnion),
screenPrivateCount);
if (!pScreen->devPrivates && screenPrivateCount)
{
free(pScreen);
return -1;
}
ret = init_screen(pScreen, i);
if (ret != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment