History

lavfi/avfiltergraph: add check before free the format

ff_merge_samplerates will be deallocate a or b in some case, so add a check before free the format.

Jun Zhao committed 7 years ago

Commit f156f4a1 parent df6876d1 file · +4 −2Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.c+4−2
@@ -419,8 +419,10 @@ static int can_merge_formats(AVFilterFormats *a_arg, · 418 unmodified lines
419419 av_freep(&ret);
420420 return 1;
421421 } else {
422− av_freep(&a->formats);
423− av_freep(&b->formats);
422+ if (a)
423+ av_freep(&a->formats);
424+ if (b)
425+ av_freep(&b->formats);
424426 av_freep(&a);
425427 av_freep(&b);
426428 return 0;

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