These names leak because freeing them in the uninit function has been forgotten. Instead of adding the freeing code, this commit stops allocating these names. They are constants anyway.
Unified · Split
| @@ -673,27 +673,19 @@ static av_cold int init(AVFilterContext *ctx) · 672 unmodified lines | ||
| 673 | 673 | s->inverse = 1; |
| 674 | 674 | |
| 675 | 675 | pad.type = AVMEDIA_TYPE_VIDEO; |
| 676 | − pad.name = av_strdup("main"); | |
| 676 | + pad.name = "main"; | |
| 677 | 677 | pad.config_props = config_input; |
| 678 | − if (!pad.name) | |
| 679 | − return AVERROR(ENOMEM); | |
| 680 | 678 | |
| 681 | − if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) { | |
| 682 | − av_freep(&pad.name); | |
| 679 | + if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) | |
| 683 | 680 | return ret; |
| 684 | − } | |
| 685 | 681 | |
| 686 | 682 | if (!s->inplace) { |
| 687 | 683 | pad.type = AVMEDIA_TYPE_VIDEO; |
| 688 | − pad.name = av_strdup("alpha"); | |
| 684 | + pad.name = "alpha"; | |
| 689 | 685 | pad.config_props = NULL; |
| 690 | − if (!pad.name) | |
| 691 | − return AVERROR(ENOMEM); | |
| 692 | 686 | |
| 693 | − if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0) { | |
| 694 | − av_freep(&pad.name); | |
| 687 | + if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0) | |
| 695 | 688 | return ret; |
| 696 | − } | |
| 697 | 689 | } |
| 698 | 690 | |
| 699 | 691 | return 0; |