From: Christophe CURIS <christophe.cu...@free.fr> As pointed by Coverity, the allocated temporary storage was not freed. As an allocation is not needed here, replaced by a local storage. --- WINGs/wtextfield.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c index de71244..adf90c4 100644 --- a/WINGs/wtextfield.c +++ b/WINGs/wtextfield.c @@ -262,15 +262,14 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void * _TARGETS = XInternAtom(dpy, "TARGETS", False); if (target == _TARGETS) { - Atom *ptr; + Atom supported_type[4]; - ptr = wmalloc(4 * sizeof(Atom)); - ptr[0] = _TARGETS; - ptr[1] = XA_STRING; - ptr[2] = TEXT; - ptr[3] = COMPOUND_TEXT; + supported_type[0] = _TARGETS; + supported_type[1] = XA_STRING; + supported_type[2] = TEXT; + supported_type[3] = COMPOUND_TEXT; - data = WMCreateDataWithBytes(ptr, 4 * 4); + data = WMCreateDataWithBytes(supported_type, sizeof(supported_type)); WMSetDataFormat(data, 32); *type = target; -- 1.9.2 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.