From a53d77b39b0c04cfd1147dd883a469377c035f1f Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 18 Nov 2003 09:16:20 +0000 Subject: [PATCH] pointers which are freed are now cleanly set to 0 afterwards. --- lib/q.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/q.c b/lib/q.c index db9db34..a997fdd 100644 --- a/lib/q.c +++ b/lib/q.c @@ -77,7 +77,7 @@ void mem_init(mem_t*mem) } void mem_clear(mem_t*mem) { - free(mem->buffer); + free(mem->buffer);mem->buffer = 0; } void mem_destroy(mem_t*mem) { @@ -191,7 +191,7 @@ void ringbuffer_put(ringbuffer_t*r, void*buf, int len) void ringbuffer_clear(ringbuffer_t*r) { ringbuffer_internal_t*i = (ringbuffer_internal_t*)r->internal; - free(i->buffer); + free(i->buffer);i->buffer = 0; free(i); } -- 1.7.10.4