rem: free(texture);
add: wfree(texture);
context: wTextureDestroy(WScreen *scr, WTexture *texture){    int i;    int count=0;    unsigned long colors[8];    #ifdef DEBUG        if (texture==NULL) {	printf("BUG: trying to free NULL texture\n");	return;    }#endif    /*      * some stupid servers don't like white or black being freed...     */#define CANFREE(c) (c!=scr->black_pixel && c!=scr->white_pixel && c!=0)    switch (texture->any.type) {     case WTEX_SOLID:	XFreeGC(dpy, texture->solid.light_gc);	XFreeGC(dpy, texture->solid.dark_gc);	XFreeGC(dpy, texture->solid.dim_gc);	if (CANFREE(texture->solid.light.pixel))	  colors[count++] = texture->solid.light.pixel;	if (CANFREE(texture->solid.dim.pixel))	  colors[count++] = texture->solid.dim.pixel;	if (CANFREE(texture->solid.dark.pixel))	  colors[count++] = texture->solid.dark.pixel;	break;     case WTEX_PIXMAP:	RDestroyImage(texture->pixmap.pixmap);	break;	     case WTEX_MHGRADIENT:     case WTEX_MVGRADIENT:     case WTEX_MDGRADIENT:	for (i=0; texture->mgradient.colors[i]!=NULL; i++) {	    free(texture->mgradient.colors[i]);	}	free(texture->mgradient.colors);	break;     case WTEX_THGRADIENT:     case WTEX_TVGRADIENT:     case WTEX_TDGRADIENT:		RDestroyImage(texture->tgradient.pixmap);	break;#ifdef TEXTURE_PLUGIN     case WTEX_FUNCTION:#ifdef HAVE_DLFCN_H        if (texture->function.handle) {	    dlclose(texture->function.handle);	}#endif	for (i = 0; i < texture->function.argc; i++) {	    free(texture->function.argv[i]);	}	free(texture->function.argv);	break;#endif /* TEXTURE_PLUGIN */    }    if (CANFREE(texture->any.color.pixel))      colors[count++] = texture->any.color.pixel;    if (count > 0) {	XErrorHandler oldhandler;		/* ignore error from buggy servers that don't know how	 * to do reference counting for colors. */	XSync(dpy,0);	oldhandler = XSetErrorHandler(dummyErrorHandler);	XFreeColors(dpy, scr->w_colormap, colors, count, 0);	XSync(dpy,0);	XSetErrorHandler(oldhandler);    }    XFreeGC(dpy, texture->any.gc);    free(texture);#undef CANFREE    }