History

lavf: don't try to free private options if priv_data is NULL.

This might happen if there was an error before priv_data was allocated and result in segfault.

Anton Khirnov committed 15 years ago

Commit dbaba521 parent 9bcbb251 file · +1 −1Browse files

Unified · Split

libavformat/utils.c+1−1
@@ -2551,7 +2551,7 @@ void avformat_free_context(AVFormatContext *s) · 2550 unmodified lines
25512551 AVStream *st;
25522552
25532553 av_opt_free(s);
2554− if (s->iformat && s->iformat->priv_class)
2554+ if (s->iformat && s->iformat->priv_class && s->priv_data)
25552555 av_opt_free(s->priv_data);
25562556
25572557 for(i=0;i<s->nb_streams;i++) {

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