rem: free(applist);
add: wfree(applist);
context: wAppIconCreate(WWindow *leader_win){    WAppIcon *aicon;#ifdef REDUCE_APPICONS    WAppIcon *atmp;    WAppIconAppList *applist;    char *tinstance, *tclass;#endif    WScreen *scr = leader_win->screen_ptr;    aicon = wmalloc(sizeof(WAppIcon));    wretain(aicon);    memset(aicon, 0, sizeof(WAppIcon));#ifdef REDUCE_APPICONS    applist = wmalloc(sizeof(WAppIconAppList));    memset(applist, 0, sizeof(WAppIconAppList));    applist->wapp = wApplicationOf(leader_win->main_window);    aicon->applist = applist;    if (applist->wapp == NULL) {	/* Something's wrong. wApplicationOf() should always return a	 * valid structure.  Rather than violate assumptions, bail. -cls	 */	free(applist);	wrelease(aicon);	return NULL;    }#endif    aicon->yindex = -1;    aicon->xindex = -1;    aicon->prev = NULL;    aicon->next = scr->app_icon_list;    if (scr->app_icon_list) {#ifndef REDUCE_APPICONS        scr->app_icon_list->prev = aicon;#else	/* If we aren't going to have a match, jump straight to new appicon */	if (leader_win->wm_class == NULL || leader_win->wm_class == NULL)	    atmp = NULL;	else	atmp = scr->app_icon_list;	while (atmp != NULL) {	    if ((tinstance = atmp->wm_instance) == NULL)		tinstance = "";	    if ((tclass = atmp->wm_class) == NULL)		tclass = "";	    if ((strcmp(leader_win->wm_class, tclass) == 0) &&		(strcmp(leader_win->wm_instance, tinstance) == 0))	    {		/* We have a winner */		wrelease(aicon);		atmp->num_apps++;		applist->next = atmp->applist;		if (atmp->applist)		    atmp->applist->prev = applist;		atmp->applist = applist;		if (atmp->docked) {		    wDockSimulateLaunch(atmp->dock, atmp);		}		return atmp;	    }	    atmp = atmp->next;	}	if (atmp == NULL) {	    scr->app_icon_list->prev = aicon;	}#endif /* REDUCE_APPICONS */    }    scr->app_icon_list = aicon;    if (leader_win->wm_class)        aicon->wm_class = wstrdup(leader_win->wm_class);    if (leader_win->wm_instance)        aicon->wm_instance = wstrdup(leader_win->wm_instance);#ifdef REDUCE_APPICONS    aicon->num_apps = 1;#endif    aicon->icon = wIconCreate(leader_win);#ifdef DEMATERIALIZE_ICON    {        XSetWindowAttributes attribs;        attribs.save_under = True;        XChangeWindowAttributes(dpy, aicon->icon->core->window,                CWSaveUnder, &attribs);    }#endif#ifdef XDND    wXDNDMakeAwareness(aicon->icon->core->window);#endif    /* will be overriden if docked */    aicon->icon->core->descriptor.handle_mousedown = appIconMouseDown;    aicon->icon->core->descriptor.handle_expose = iconExpose;    aicon->icon->core->descriptor.parent_type = WCLASS_APPICON;    aicon->icon->core->descriptor.parent = aicon;    AddToStackList(aicon->icon->core);    aicon->icon->show_title = 0;    wIconUpdate(aicon->icon);    return aicon;}