rem: if (command) free(command);
add: if (command) wfree(command);
context: wWindowGetSavedState(Window win){    char *instance, *class, *command=NULL;    WWindowState *wstate = windowState;    char **argv;    int argc;    if (!wstate)        return NULL;    if (XGetCommand(dpy, win, &argv, &argc)) {	if (argc > 0)	    command = wtokenjoin(argv, argc);        XFreeStringList(argv);    }    if (!command)        return NULL;    if (PropGetWMClass(win, &class, &instance)) {        while (wstate) {            if (SAME(instance, wstate->instance) &&                SAME(class, wstate->class) &&                SAME(command, wstate->command)) {                break;            }            wstate = wstate->next;        }    } else {        wstate = NULL;    }#ifdef DEBUG    printf("Read WindowState with ID %p, for %s.%s : \"%s\"\n", wstate, instance,           class, command);#endif    if (command) free(command);    if (instance) XFree(instance);    if (class) XFree(class);    return wstate;}