From: Wolfgang Bumiller Date: Sat, 28 Apr 2012 09:30:52 +0000 (+0200) Subject: 2 missind free->mem_d in MEM_VECTOR macros X-Git-Tag: 0.1-rc1~567^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f3a9c8c3626626ddcb6a63b07cfea54ae3e5f5e6;p=xonotic%2Fgmqcc.git 2 missind free->mem_d in MEM_VECTOR macros --- diff --git a/gmqcc.h b/gmqcc.h index d284526..37871aa 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -655,17 +655,17 @@ void Tself##_##mem##_clear(Tself *self) \ { \ if (!self->mem) \ return; \ - free((void*) self->mem); \ + mem_d((void*) self->mem); \ self->mem = NULL; \ self->mem##_count = 0; \ self->mem##_alloc = 0; \ } -#define MEM_VECTOR_CLEAR(owner, mem) \ - if ((owner)->mem) \ - free((void*)((owner)->mem)); \ - (owner)->mem = NULL; \ - (owner)->mem##_count = 0; \ +#define MEM_VECTOR_CLEAR(owner, mem) \ + if ((owner)->mem) \ + mem_d((void*)((owner)->mem)); \ + (owner)->mem = NULL; \ + (owner)->mem##_count = 0; \ (owner)->mem##_alloc = 0 #define MEM_VECTOR_INIT(owner, mem) \