intel: Don't leak the tex object miptree when replacing it
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 28 Mar 2011 17:13:25 +0000 (10:13 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 29 Mar 2011 02:54:51 +0000 (19:54 -0700)
commite21beaeb10711a38276d704c4e058cb07f9b23e6
tree586a44fe2dee499018a41cef7a79ff7c71f869f3
parent92e29dc5b0474c073b0f05d60629fc6c3decfca4
intel: Don't leak the tex object miptree when replacing it

Eventually the miptree refcounting interface should be cleaned up.
The assymmetry dramatically increases the probability of bugs like
this.  It should be made to like like libdrm refcounting or the
refcounting style used in other parts of Mesa.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33046

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_tex_image.c