mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
Avoid a potential memleak in parse_obj_params in case of a missing
m_ob_params_t part. Fixes bug #1318. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27869 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d4020af479
commit
aa589da439
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user