rem: free(buf);
add: wfree(buf);
context: panelBtnCallback(WMWidget *self, void *data){    WMButton *btn = self;    AppSettingsPanel *panel = (AppSettingsPanel*)data;    char *text;    int done;    done = 1;    if (panel->okBtn == btn) {	text = WMGetTextFieldText(panel->iconField);	if (text[0]==0) {	    free(text);	    text = NULL;	}	if (!wIconChangeImageFile(panel->editedIcon->icon, text)) {	    char *buf;	    buf = wmalloc(strlen(text) + 64);	    sprintf(buf, _("Could not open specified icon file: %s"), text);	    if (wMessageDialog(panel->wwin->screen_ptr, _("Error"), buf,			       _("OK"), _("Ignore"), NULL) == WAPRDefault) {		if (text)		    free(text);		free(buf);		return;	    }	    free(buf);	} else {	    WAppIcon *aicon = panel->editedIcon;	    if (aicon == aicon->icon->core->screen_ptr->clip_icon)		wClipIconPaint(aicon);	    else		wAppIconPaint(aicon);	    wDefaultChangeIcon(panel->wwin->screen_ptr, aicon->wm_instance,			       aicon->wm_class, text);	}	if (text)	    free(text);	/* cannot free text from this, because it will be not be duplicated	 * in updateCommand */	text = WMGetTextFieldText(panel->commandField);	if (text[0]==0) {	    free(text);	    text = NULL;	}	updateCommand(panel->editedIcon, text);#ifdef OFFIX_DND	/* cannot free text from this, because it will be not be duplicated	 * in updateDNDCommand */	text = WMGetTextFieldText(panel->dndCommandField);	updateDNDCommand(panel->editedIcon, text);#endif	panel->editedIcon->auto_launch =	    WMGetButtonSelected(panel->autoLaunchBtn);	panel->editedIcon->lock =	    WMGetButtonSelected(panel->lockBtn);    }    if (done)	DestroyDockAppSettingsPanel(panel);}