From: Brian Date: Fri, 7 Dec 2007 20:19:00 +0000 (-0700) Subject: don't dereference pt after realloc - fixes valgrind error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd87c43a44871e6cf7c3328120c50447bd69c26c;p=mesa.git don't dereference pt after realloc - fixes valgrind error --- diff --git a/src/mesa/pipe/softpipe/sp_texture.c b/src/mesa/pipe/softpipe/sp_texture.c index e8cdd67435b..2288c343bf1 100644 --- a/src/mesa/pipe/softpipe/sp_texture.c +++ b/src/mesa/pipe/softpipe/sp_texture.c @@ -386,7 +386,7 @@ softpipe_texture_create(struct pipe_context *pipe, struct pipe_texture **pt) if (spt->buffer) { pipe->winsys->buffer_data(pipe->winsys, spt->buffer, - spt->pitch * (*pt)->cpp * + spt->pitch * spt->base.cpp * spt->total_height, NULL, PIPE_BUFFER_USAGE_PIXEL); }