changeset 71:ce49160d2599

Oops, the I/O context initialization was memsetting &pointer instead of pointer directly, causing nasty (but easily noticeable) memory corruption.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 15 Nov 2012 19:44:59 +0200
parents a0e1b29be35d
children 43df05a632cb
files th_ioctx.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/th_ioctx.c	Thu Nov 15 19:32:00 2012 +0200
+++ b/th_ioctx.c	Thu Nov 15 19:44:59 2012 +0200
@@ -15,7 +15,8 @@
     if (ctx == NULL || filename == NULL)
         return FALSE;
 
-    th_memset(&ctx, 0, sizeof(ctx));
+    th_memset(ctx, 0, sizeof(ctx));
+
     if ((ctx->filename = th_strdup(filename)) == NULL)
         return FALSE;