From: Christophe CURIS <christophe.cu...@free.fr>

As pointed by Coverity, the data returned by WMGetTextSelectedStream are
actually a newly allocated buffer, so we need to release it when we're done
with it.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 WINGs/wtext.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 074da89..495be70 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -2052,6 +2052,7 @@ static WMData *requestHandler(WMView * view, Atom 
selection, Atom target, void *
                if (text) {
                        data = WMCreateDataWithBytes(text, strlen(text));
                        WMSetDataFormat(data, TYPETEXT);
+                       wfree(text);
                }
                *type = target;
                return data;
-- 
1.9.2


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to