Fix a rare memory leak

Signed-off-by: Servaas Vandenberghe <vdb@picaros.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
vdb@picaros.org 2011-09-17 18:55:47 +02:00 committed by Jeremy Huddleston
parent 5361121339
commit e4cddf509e

View File

@ -133,6 +133,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn,
crtcs = malloc((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); crtcs = malloc((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr));
if (!crtcs) if (!crtcs)
{ {
free(crtc->gamma_red);
free(crtc); free(crtc);
return NULL; return NULL;
} }