rem: free(fullpath);
add: wfree(fullpath);
context: wfindfileinlist(char **path_list, char *file){    int i;    char *path;    int len, flen;    char *fullpath;    if (!file)	return NULL;        if (*file=='/' || *file=='~' || !path_list) {	if (access(file, F_OK)<0) {	    fullpath = wexpandpath(file);	    if (!fullpath)		return NULL;	    	    if (access(fullpath, F_OK)<0) {		free(fullpath);		return NULL;	    } else {		return fullpath;	    }	} else {	    return wstrdup(file);	}    }    flen = strlen(file);    for (i=0; path_list[i]!=NULL; i++) {	len = strlen(path_list[i]);	path = wmalloc(len+flen+2);	path = memcpy(path, path_list[i], len);	path[len]=0;	strcat(path, "/");	strcat(path, file);	/* expand tilde */	fullpath = wexpandpath(path);	free(path);	if (fullpath) {	    /* check if file exists */	    if (access(fullpath, F_OK)==0) {		return fullpath;	    }	    free(fullpath);	}    }    return NULL;}