changeset 17667:8f036d112bb6

use calloc instead of malloc in copy_func_pf, missing initialization of next field caused crash (fixes bug #459)
author reimar
date Wed, 22 Feb 2006 20:39:44 +0000
parents 87d2ac3e2354
children b822575a1140
files m_option.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m_option.c	Wed Feb 22 11:32:41 2006 +0000
+++ b/m_option.c	Wed Feb 22 20:39:44 2006 +0000
@@ -718,7 +718,7 @@
     free_func_pf(dst);
 
   while(s) {
-    d = (m_func_save_t*)malloc(sizeof(m_func_save_t));
+    d = (m_func_save_t*)calloc(1,sizeof(m_func_save_t));
     d->name = strdup(s->name);
     d->param = s->param ? strdup(s->param) : NULL;
     if(last)