1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-07 14:24:14 +01:00

WINGs: fix memory leak in requestHandler (Coverity #50135)

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.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-05-18 21:31:46 +02:00
committed by Carlos R. Mafra
parent 6831daf427
commit 482d8d3583

View File

@@ -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;