From e700431a8acfcd69bdf6fc900d01e1dd3c5deab0 Mon Sep 17 00:00:00 2001 From: Jesse Adkins Date: Sat, 21 Nov 2009 14:29:57 -0800 Subject: [[PATCH]] Fix a potential memory leak in ProcRotateProperties. Signed-off-by: Jesse Adkins --- dix/property.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dix/property.c b/dix/property.c index 9ec5dc6..713e0df 100644 --- a/dix/property.c +++ b/dix/property.c @@ -140,6 +140,11 @@ ProcRotateProperties(ClientPtr client) props = xalloc(stuff->nAtoms * sizeof(PropertyPtr)); saved = xalloc(stuff->nAtoms * sizeof(PropertyRec)); if (!props || !saved) { + if (props) + xfree(props); + if (saved) + xfree(saved); + rc = BadAlloc; goto out; } -- 1.6.0.4