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

Unified · Split

libavfilter/avfiltergraph.c+4−2
@@ -419,8 +419,10 @@ static int can_merge_formats(AVFilterFormats *a_arg, · 418 unmodified lines
419 av_freep(&ret);419 av_freep(&ret);
420 return 1;420 return 1;
421 } else {421 } else {
422 av_freep(&a->formats);422 if (a)
423 av_freep(&b->formats);423 av_freep(&a->formats);
424 if (b)
425 av_freep(&b->formats);
424 av_freep(&a);426 av_freep(&a);
425 av_freep(&b);427 av_freep(&b);
426 return 0;428 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