changeset 20101:4ccb2a53b859

Avoid memleak when calling parse_obj_params only for syntax-checking (dst == NULL)
author reimar
date Sun, 08 Oct 2006 09:43:18 +0000
parents 1494f672c99d
children 3047f69e3d74
files m_option.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m_option.c	Sun Oct 08 09:32:30 2006 +0000
+++ b/m_option.c	Sun Oct 08 09:43:18 2006 +0000
@@ -1428,7 +1428,7 @@
     return M_OPT_INVALID;
   
   desc = p->desc;
-  r = get_obj_params(name,desc->name,cpy,desc,p->separator,&opts);
+  r = get_obj_params(name,desc->name,cpy,desc,p->separator,dst ? &opts : NULL);
   free(cpy);
   if(r < 0)
     return r;