rem: free(path);
add: wfree(path);
context: WMGetStandardUserDefaults(void){    WMUserDefaults *defaults;    proplist_t domain;    proplist_t key;    char *path;    int i;    if (sharedUserDefaults) {        defaults = sharedUserDefaults;        while (defaults) {            /* Trick, path == NULL only for StandardUserDefaults db */            if (defaults->path == NULL)                return defaults;            defaults = defaults->next;        }    }    /* we didn't found the database we are looking for. Go read it. */    defaults = wmalloc(sizeof(WMUserDefaults));    memset(defaults, 0, sizeof(WMUserDefaults));    defaults->defaults = PLMakeDictionaryFromEntries(NULL, NULL, NULL);    defaults->searchList = wmalloc(sizeof(proplist_t)*3);    /* application domain */    key = PLMakeString(WMGetApplicationName());    defaults->searchList[0] = key;    /* temporary kluge */    if (strcmp(WMGetApplicationName(), "WindowMaker")==0) {        domain = NULL;        path = NULL;    } else {        path = wdefaultspathfordomain(PLGetString(key));        domain = PLGetProplistWithPath(path);    }    if (!domain) {        proplist_t p;        domain = PLMakeDictionaryFromEntries(NULL, NULL, NULL);        if (path) {            p = PLMakeString(path);            PLSetFilename(domain, p);            PLRelease(p);        }    }    if (path)        free(path);    defaults->appDomain = domain;    if (domain)        PLInsertDictionaryEntry(defaults->defaults, key, domain);    PLRelease(key);    /* global domain */    key = PLMakeString("WMGLOBAL");    defaults->searchList[1] = key;    path = wdefaultspathfordomain(PLGetString(key));    domain = PLGetProplistWithPath(path);    free(path);    if (!domain)        domain = PLMakeDictionaryFromEntries(NULL, NULL, NULL);    if (domain)        PLInsertDictionaryEntry(defaults->defaults, key, domain);    PLRelease(key);    /* terminate list */    defaults->searchList[2] = NULL;    defaults->searchListArray=PLMakeArrayFromElements(NULL,NULL);    i = 0;    while (defaults->searchList[i]) {        PLAppendArrayElement(defaults->searchListArray,                             defaults->searchList[i]);        i++;    }    if (sharedUserDefaults)        defaults->next = sharedUserDefaults;    sharedUserDefaults = defaults;    registerSaveOnExit();    return defaults;}