History

fftools/textformat/avtextformat: Fix segfault upon allocation error

Andreas Rheinhardt committed 1 year ago

Commit 7ee76321 parent b9450581 file · +6 −4Browse files

Unified · Split

fftools/textformat/avtextformat.c+6−4
@@ -590,10 +590,12 @@ int avtextwriter_context_close(AVTextWriterContext **pwctx) · 589 unmodified lines
590 if (!wctx)590 if (!wctx)
591 return EINVAL;591 return EINVAL;
592 592
593 if (wctx->writer->uninit)593 if (wctx->writer) {
594 wctx->writer->uninit(wctx);594 if (wctx->writer->uninit)
595 if (wctx->writer->priv_class)595 wctx->writer->uninit(wctx);
596 av_opt_free(wctx->priv);596 if (wctx->writer->priv_class)
597 av_opt_free(wctx->priv);
598 }
597 av_freep(&wctx->priv);599 av_freep(&wctx->priv);
598 av_freep(pwctx);600 av_freep(pwctx);
599 return ret;601 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t