diff options
author | 2006-02-22 20:39:44 +0000 | |
---|---|---|
committer | 2006-02-22 20:39:44 +0000 | |
commit | 2e51fd4440edf02797b1e1a36a8fad614684a835 (patch) | |
tree | 38088ac7846e862c473f2e63fe4f74d427646eb9 | |
parent | 3b440b1deb8d2fbe5be4b783f5568e2af661595f (diff) |
use calloc instead of malloc in copy_func_pf, missing initialization of
next field caused crash (fixes bug #459)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17668 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | m_option.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/m_option.c b/m_option.c index 850d117594..47a14c46c2 100644 --- a/m_option.c +++ b/m_option.c @@ -718,7 +718,7 @@ static void copy_func_pf(m_option_t* opt,void* dst, void* src) { 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) |