rem: free(ipath);
add: wfree(ipath);
context: browseImageCallback(WMWidget *w, void *data){    TexturePanel *panel = (TexturePanel*)data;    WMOpenPanel *opanel;    WMScreen *scr = WMWidgetScreen(w);    static char *ipath = NULL;    opanel = WMGetOpenPanel(scr);    WMSetFilePanelCanChooseDirectories(opanel, False);    WMSetFilePanelCanChooseFiles(opanel, True);    if (!ipath)	ipath = wstrdup(wgethomedir());        if (WMRunModalFilePanelForDirectory(opanel, panel->win, ipath,					"Open Image", NULL)) {	char *path, *fullpath;	char *tmp, *tmp2;	tmp = WMGetFilePanelFileName(opanel);	if (!tmp)	    return;	fullpath = tmp;	free(ipath);	ipath = fullpath;	path = wstrdup(fullpath);	tmp2 = strrchr(fullpath, '/');	if (tmp2)	    tmp2++;	tmp = wfindfileinarray(panel->pathList, tmp2);	if (tmp) {	    if (strcmp(fullpath, tmp)==0) {		free(path);		path = tmp2;	    }	    free(tmp);	}	if (!RGetImageFileFormat(fullpath)) {	    WMRunAlertPanel(scr, panel->win, _("Error"),			    _("The selected file does not contain a supported image."),			    _("OK"), NULL, NULL);	    free(path);	} else {	    updateImage(panel, fullpath);	    free(panel->imageFile);	    panel->imageFile = path;	    WMSetTextFieldText(panel->imageT, path);	}    }}