diff options
author | Brian Paul <[email protected]> | 2001-12-15 00:49:00 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-12-15 00:49:00 +0000 |
commit | 36c77a81add227cbd04489c679ede111b1d7754c (patch) | |
tree | b3b5ac9ab795276eec29168c22a6e5ed4d53e9c4 /src/mesa/tnl/t_imm_alloc.c | |
parent | 9745d479913af5cff71821bb4bee42c3d9d0fb26 (diff) |
free the NormalLengthPtr if non-null in _tnl_free_immediate()
Diffstat (limited to 'src/mesa/tnl/t_imm_alloc.c')
-rw-r--r-- | src/mesa/tnl/t_imm_alloc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c index ff9c902171a..a0708d5f28f 100644 --- a/src/mesa/tnl/t_imm_alloc.c +++ b/src/mesa/tnl/t_imm_alloc.c @@ -1,8 +1,8 @@ -/* $Id: t_imm_alloc.c,v 1.11 2001/12/14 02:51:44 brianp Exp $ */ +/* $Id: t_imm_alloc.c,v 1.12 2001/12/15 00:49:00 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.1 * * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * @@ -34,7 +34,7 @@ #include "t_imm_alloc.h" - static int id = 0; +static int id = 0; /* give each struct immediate a unique ID number */ static struct immediate *real_alloc_immediate( GLcontext *ctx ) { @@ -62,6 +62,7 @@ static struct immediate *real_alloc_immediate( GLcontext *ctx ) IM->CopyTexSize = 0; IM->CopyStart = IM->Start; + /* TexCoord0 is special. */ IM->TexCoord[0] = IM->TexCoord0; @@ -129,6 +130,11 @@ void _tnl_free_immediate( struct immediate *IM ) ASSERT(IM->ref_count == 0); + if (IM->NormalLengthPtr) { + ALIGN_FREE(IM->NormalLengthPtr); + IM->NormalLengthPtr = NULL; + } + if (!tnl) { real_free_immediate( IM ); } |