[PATCH 07/11] Xi: fix memory leak in ProcXGetSelectedExtensionEvents

Tiago Vignatti tiago.vignatti at nokia.com
Fri Mar 25 11:41:49 PDT 2011


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 Xi/getselev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Xi/getselev.c b/Xi/getselev.c
index 09a53f4..7304738 100644
--- a/Xi/getselev.c
+++ b/Xi/getselev.c
@@ -152,8 +152,8 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
     if (total_length) {
 	client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
 	WriteSwappedDataToClient(client, total_length, buf);
-	free(buf);
     }
+    free(buf);
     return Success;
 }
 
-- 
1.7.0.4



More information about the xorg-devel mailing list