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:
parent
5361121339
commit
e4cddf509e
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue