[MPlayer-cvslog] r27869 - trunk/m_option.c
reimar
subversion at mplayerhq.hu
Fri Oct 31 13:59:17 CET 2008
Author: reimar
Date: Fri Oct 31 13:59:17 2008
New Revision: 27869
Log:
Avoid a potential memleak in parse_obj_params in case of a missing
m_ob_params_t part. Fixes bug #1318.
Modified:
trunk/m_option.c
Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c (original)
+++ trunk/m_option.c Fri Oct 31 13:59:17 2008
@@ -1476,13 +1476,14 @@ static int parse_obj_params(const m_opti
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)
More information about the MPlayer-cvslog
mailing list