RRModeCreate: also free mode in error case.
Mihai Moldovan
ionic at ionic.de
Sun Jun 14 14:20:49 PDT 2015
This is a follow-up to c7b7abfaa068042e396d19538215402cfbb4f1e4.
Signed-off-by: Mihai Moldovan <ionic at ionic.de>
---
randr/rrmode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/randr/rrmode.c b/randr/rrmode.c
index a7aa433..ef90a46 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -90,6 +90,7 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
mode->mode.id = FakeClientID(0);
if (!AddResource(mode->mode.id, RRModeType, (void *) mode)) {
+ free(mode);
free(newModes);
return NULL;
}
--
2.4.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150614/4d484904/attachment.sig>
More information about the xorg-devel
mailing list