diff options
author | Brian Paul <[email protected]> | 2001-12-15 00:48:41 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-12-15 00:48:41 +0000 |
commit | f6e1618f976f69b209bf2c02b5a824a28d64a4a1 (patch) | |
tree | 5fd484159acd10e16d9dc7ae1cff3ead9a54f8d1 /src | |
parent | 3a450fb4b08aa89718e0de756600552cefdad4f3 (diff) |
free the NormalLengthPtr if non-null in _tnl_free_immediate()
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/tnl/t_imm_alloc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c index 302d739c7f3..4ea8addedd5 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.10 2001/09/07 06:55:59 joukj Exp $ */ +/* $Id: t_imm_alloc.c,v 1.10.2.1 2001/12/15 00:48:41 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 ) { @@ -130,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 ); } |