rem: free(tmp);
add: wfree(tmp);
context: fillModifierPopUp(WMPopUpButton *pop){    XModifierKeymap *mapping;    Display *dpy = WMScreenDisplay(WMWidgetScreen(pop));    int i, j;    char *str;    char buffer[64];        mapping = XGetModifierMapping(dpy);    if (!mapping || mapping->max_keypermod==0) {	WMAddPopUpButtonItem(pop, "Mod1");	WMAddPopUpButtonItem(pop, "Mod2");	WMAddPopUpButtonItem(pop, "Mod3");	WMAddPopUpButtonItem(pop, "Mod4");	WMAddPopUpButtonItem(pop, "Mod5");	wwarning(_("could not retrieve keyboard modifier mapping"));	return;    }            for (j=0; j<8; j++) {	int idx;	char *array[8];	int a;	KeySym ksym;	int k;	char *ptr;	char *tmp;	a = 0;	memset(array, 0, sizeof(char*)*8);	for (i=0; i < mapping->max_keypermod; i++) {	    idx = i+j*mapping->max_keypermod;	    if (mapping->modifiermap[idx]!=0) {		int l;		for (l=0; l<4; l++) {		    ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], l);		    if (ksym!=NoSymbol)			break;		}		if (ksym!=NoSymbol)		    str = XKeysymToString(ksym);		else		    str = NULL;		if (str && !strstr(str, "_Lock") && !strstr(str, "Shift") 		    && !strstr(str, "Control")) {		    array[a++] = wstrdup(str);		}	    }	}	for (k=0; k<a; k++) {	    if (array[k]==NULL)		continue;	    tmp = wstrdup(array[k]);	    ptr = strstr(tmp, "_L");	    if (ptr)		*ptr = 0;	    ptr = strstr(tmp, "_R");	    if (ptr)		*ptr = 0;	    sprintf(buffer, "%s (%s)", modifierNames[j], tmp);	    WMAddPopUpButtonItem(pop, buffer);	    for (i=k+1; i<a; i++) {		if (array[i] == NULL)		    continue;		if (strstr(array[i], tmp)) {		    free(array[i]);		    array[i]=NULL;		    break;		}	    }	    free(tmp);	}		while (--a>0) {	    if (array[a])		free(array[a]);	}    }        if (mapping)	XFreeModifiermap(mapping);}