[PATCH v2 15/25] [libx11] property_return was free'd before and in the case the conditional is true, the call to XcmsGetProperty failed which means that property_return wasn't set so there is no need to free it again.

Erkki Seppälä erkki.seppala at vincit.fi
Mon Jan 31 04:02:07 PST 2011


From: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>

Double free of pointer "property_return" in call to "free"

Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
 src/xcms/LRGB.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/xcms/LRGB.c b/src/xcms/LRGB.c
index 2f7a4cc..d9168bd 100644
--- a/src/xcms/LRGB.c
+++ b/src/xcms/LRGB.c
@@ -573,7 +573,6 @@ LINEAR_RGB_InitSCCData(
     if (CorrectAtom == None ||
 	!_XcmsGetProperty (dpy, RootWindow(dpy, screenNumber), CorrectAtom,
 	   &format_return, &nitems, &nbytes_return, &property_return)) {
-	Xfree ((char *)property_return);
 	goto FreeSCCData;
     }
 
-- 
1.7.0.4



More information about the xorg-devel mailing list