lavfi/f_sendcmd: clear Command on alloc failure
If the command array failed to allocate, the current parsed Command has to be cleared, else memory allocated for it would be leaked. Fix CID 1638635
This commit is contained in:
parent
2c3ac6e0fa
commit
089e69dfe4
1 changed files with 1 additions and 0 deletions
|
|
@ -257,6 +257,7 @@ static int parse_commands(Command **cmds, int *nb_cmds, int interval_count,
|
|||
if (!*cmds) {
|
||||
av_log(log_ctx, AV_LOG_ERROR,
|
||||
"Could not (re)allocate command array\n");
|
||||
clear_command(&cmd);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue