aboutsummaryrefslogtreecommitdiffhomepage
path: root/m_option.c
diff options
context:
space:
mode:
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/m_option.c b/m_option.c
index e2a644402b..1991bb4a56 100644
--- a/m_option.c
+++ b/m_option.c
@@ -1476,13 +1476,14 @@ static int parse_obj_params(const m_option_t* opt,const char *name,
int r;
m_obj_params_t* p = opt->priv;
const m_struct_t* desc;
- char* cpy = strdup(param);
+ char* cpy;
// We need the object desc
if(!p)
return M_OPT_INVALID;
desc = p->desc;
+ cpy = strdup(param);
r = get_obj_params(name,desc->name,cpy,desc,p->separator,dst ? &opts : NULL);
free(cpy);
if(r < 0)