From: Luca Barbieri Date: Fri, 6 Aug 2010 07:53:15 +0000 (+0200) Subject: u_surfaces: fix surface leak due to off by one X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24f5ebb1d735ca7e8944b346359de5941e707047;p=mesa.git u_surfaces: fix surface leak due to off by one --- diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c index b5d21570d57..f6e5801ef65 100644 --- a/src/gallium/auxiliary/util/u_surfaces.c +++ b/src/gallium/auxiliary/util/u_surfaces.c @@ -99,7 +99,7 @@ util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void ( if(us->u.array) { unsigned i; - for(i = 0; i < pt->last_level; ++i) + for(i = 0; i <= pt->last_level; ++i) { struct pipe_surface *ps = us->u.array[i]; if(ps)