diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c index d27c3f4418..2a40132a70 100644 --- a/player/command.c +++ b/player/command.c @@ -2710,11 +2710,11 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (cmd->flags & MP_EXPAND_PROPERTIES) { for (int n = 0; n < cmd->nargs; n++) { if (cmd->args[n].type->type == CONF_TYPE_STRING) { - cmd->args[n].v.s = - mp_property_expand_string(mpctx, cmd->args[n].v.s); - if (!cmd->args[n].v.s) + char *s = mp_property_expand_string(mpctx, cmd->args[n].v.s); + if (!s) return; - talloc_steal(cmd, cmd->args[n].v.s); + talloc_free(cmd->args[n].v.s); + cmd->args[n].v.s = s; } } } |