History

sub/lavc_conv: free avctx correctly on error

Fixes memory leak on error.

Kacper Michajłow committed 1 year ago

Commit c5668721 parent 66321461 file · +1 −1Browse files

Unified · Split

sub/lavc_conv.c+1−1
@@ -107,7 +107,7 @@ struct lavc_conv *lavc_conv_create(struct sd *sd) · 106 unmodified lines
107 error:107 error:
108 MP_FATAL(priv, "Could not open libavcodec subtitle converter\n");108 MP_FATAL(priv, "Could not open libavcodec subtitle converter\n");
109 av_dict_free(&opts);109 av_dict_free(&opts);
110 av_free(avctx);110 avcodec_free_context(&avctx);
111 mp_free_av_packet(&priv->avpkt);111 mp_free_av_packet(&priv->avpkt);
112 mp_free_av_packet(&priv->avpkt_vtt);112 mp_free_av_packet(&priv->avpkt_vtt);
113 talloc_free(priv);113 talloc_free(priv);

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