From: Brian Date: Fri, 7 Dec 2007 20:19:00 +0000 (-0700) Subject: don't dereference pt after realloc - fixes valgrind error X-Git-Tag: 062012170305~17580^2~390^2~3272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd87c43a44871e6cf7c3328120c50447bd69c26c;p=profile%2Fivi%2Fmesa.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 e8cdd67..2288c34 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); }