Module: Mesa Branch: master Commit: 61bc014c966b3ef9743c82cb673988c05e06d9d0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=61bc014c966b3ef9743c82cb673988c05e06d9d0
Author: Siavash Eliasi <[email protected]> Date: Thu Jan 30 11:56:55 2014 +0330 mesa: Removed unnecessary check for NULL pointer when freeing memory Note that it is OK to pass NULL pointers to this function since this commit: mesa: modified _mesa_align_free() to accept NULL pointer http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0cc59d68a9f5231e8e2111393a1834858820735 Reviewed-by: Marek Olšák <[email protected]> --- src/mesa/main/bufferobj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index ca55ef9..d22e2c4 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -562,8 +562,7 @@ _mesa_buffer_data( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, (void) target; - if (bufObj->Data) - _mesa_align_free( bufObj->Data ); + _mesa_align_free( bufObj->Data ); new_data = _mesa_align_malloc( size, ctx->Const.MinMapBufferAlignment ); if (new_data) { _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
