rem: free(tmp);
add: wfree(tmp);
context: WMPathForResourceOfType(char *resource, char *ext){    char *path = NULL;    char *tmp, *appdir;    int i;        /*      * Paths are searched in this order:     * - resourcePath/ext     * - argv[0]/ext     * - GNUSTEP_USER_ROOT/Apps/ApplicationName.app/ext      * - ~/GNUstep/Apps/ApplicationName.app/ext     * - GNUSTEP_LOCAL_ROOT/Apps/ApplicationName.app/ext     * - /usr/local/GNUstep/Apps/ApplicationName.app/ext     * - GNUSTEP_SYSTEM_ROOT/Apps/ApplicationName.app/ext     * - /usr/GNUstep/Apps/ApplicationName.app/ext     */        if (WMApplication.resourcePath) {	path = checkFile(WMApplication.resourcePath, NULL, ext, resource);	if (path)	    return path;    }    if (WMApplication.argv[0]) {	tmp = wstrdup(WMApplication.argv[0]);	i = strlen(tmp);	while (i > 0 && tmp[i]!='/')	    i--;	tmp[i] = 0;	if (i>0) {	    path = checkFile(tmp, NULL, ext, resource);	} else {	    path = NULL;	}	free(tmp);	if (path)	    return path;    }        appdir = wmalloc(strlen(WMApplication.applicationName)+10);    sprintf(appdir, "Apps/%s.app", WMApplication.applicationName);    if (getenv("GNUSTEP_USER_ROOT")) {	path = checkFile(getenv("GNUSTEP_USER_ROOT"), appdir, ext, resource);	if (path) {	    free(appdir);	    return path;	}    }        tmp = wusergnusteppath();    if (tmp) {	path = checkFile(tmp, appdir, ext, resource);	if (path) {	    free(appdir);	    return path;	}    }        if (getenv("GNUSTEP_LOCAL_ROOT")) {	path = checkFile(getenv("GNUSTEP_LOCAL_ROOT"), appdir, ext, resource);	if (path) {	    free(appdir);	    return path;	}    }        path = checkFile("/usr/local/GNUstep", appdir, ext, resource);    if (path) {	free(appdir);	return path;    }        if (getenv("GNUSTEP_SYSTEM_ROOT")) {	path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);	if (path) {	    free(appdir);	    return path;	}    }    path = checkFile("/usr/GNUstep", appdir, ext, resource);    if (path) {	free(appdir);	return path;    }        return NULL;}