You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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:
@ -257,6 +257,7 @@ static int parse_commands(Command **cmds, int *nb_cmds, int interval_count,
|
|||||||
if (!*cmds) {
|
if (!*cmds) {
|
||||||
av_log(log_ctx, AV_LOG_ERROR,
|
av_log(log_ctx, AV_LOG_ERROR,
|
||||||
"Could not (re)allocate command array\n");
|
"Could not (re)allocate command array\n");
|
||||||
|
clear_command(&cmd);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user