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:
committed by
Carlos R. Mafra
parent
6831daf427
commit
482d8d3583
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user