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));
|
||||
if (!crtcs)
|
||||
{
|
||||
free(crtc->gamma_red);
|
||||
free(crtc);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user