+MlJ7wQDAQgHiHgEGBYKACAWIQQCzskBcOehk1y8GoKZR31bPD+6owUCaEpkmQIb
DAAKCRCZR31bPD+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b
XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk=
=rP+W
-END PGP PUBLIC KEY BLOCK-
Lidong Yan (4):
libavformat/rtmpproto: fix rmtp packet leak in gen_connect
In sap_write_header(), ff_format_set_url() assign new allocated new_url
to contexts[i]->url but forgot to free it later. Add two loops to free
contexts[i]->url before av_free(context).
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/sapenc.c | 6 ++
1
In config_input(), fir_to_phase() allocates memory in h[longer].
But if av_calloc() to s->coeffs failed, memory in h[longer] would
leak. Add av_free(h[longer]) in !s->coeffs path.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavfilter/asrc_sinc.c | 4 +++-
1 fil
In libavformat/rtmpproto.c:gen_connect(), if check on string length
or check on codec fourcc failed, ff_rtmp_packet_create() allocated
data in pkt would leak. Add ff_rtmp_packet_destory before return error
code.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libav
In sbg_read_header(), if avformat_new_stream() failed, it returns
without cleanup, which may cause memory leaks. Replace return statement
with goto so that we would first clean up then return.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/sbgdec.c | 6 --
In libavformat/rtmpproto.c:gen_connect(), if check on string length
or check on codec fourcc failed, ff_rtmp_packet_create() allocated
data in pkt would leak. Add ff_rtmp_packet_destory before return error
code.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
-BEGIN PGP PUBL
DAAKCRCZR31bPD+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b
XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk=
=rP+W
-END PGP PUBLIC KEY BLOCK-
Lidong Yan (2):
avfilter/asrc_sinc: fix leak in config_input()
avformat/sapenc: fix leak in sap_write_header()
libavfilter/asrc_sinc.c | 4
normal execution can fall through cleanup
code. Since normal code execution now go through code after fail label,
replace fail label with cleanup label.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/sapenc.c | 35 +++
1 file changed, 1
Michael Niedermayer writes:
> please do the rename in a seperate patch
> so there are 2 patches, this makes the changes clearer
>
Got it. Thanks for your review.
Lidong
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/li
cleanup code
to free dyn_bc. Do the same thing for iamf_write_audio_element() and
write_parameter_block().
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/iamf_writer.c | 47 +--
1 file changed, 30 insertions(+), 17 deletions(-)
In put_main_header(), av_mallocz() allocates memory to local variable
buffer, buffer leaks if av_mallocz() to *out failed. Add av_free(buffer)
before return error code.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavcodec/vorbisenc.c | 4 +++-
1 file changed, 3 inse
Add av_free(sgpd_entries)
before return.
In mov_write_track_udta_tag(), avio_open_dyn_buf() allocates a buffer,
and this buffer leaks if mov_write_track_kinds() failed. Add cleanup
code and goto cleanup if error happened.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
li
Fix multiple leaks in error paths. Simply add av_free() in error path or
replace return AVERROR* with goto cleanup to prevent from leaks.
Lidong Yan (4):
avformat/movenc: fix multiple leaks in error paths
avcodec/vorbisenc: fix leak if av_mallocz failed
avfilter/vf_lut3d: fix leak if
In parse_cinespace(), memory allocated in in_prelut[] and out_prelut[]
would leak if allocate_3dlut() failed. Replace return ret with goto end
to free memory before return error code.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavfilter/vf_lut3d.c | 2 +-
1 file chan
cleanup code
to free dyn_bc. Do the same thing for iamf_write_audio_element() and
write_parameter_block().
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/iamf_writer.c | 47 +--
1 file changed, 30 insertions(+), 17 deletions(-)
In adapt_colors(), ff_sws_lut3d_generate() allocates memory in lut.
However if add_legacy_sws_pass() failed, lut leaks. free lut before
return ret.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libswscale/graph.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
lmAogjpeQk=
=rP+W
-END PGP PUBLIC KEY BLOCK-----
Lidong Yan (3):
avformat/sapenc: fix leak in sap_write_header()
avformat/iamf_writer: fix leaks of avio_open_dyn_buf() allocated
memory
swscale/graph: fix leak in adapt_colors()
libavformat/iamf_wri
normal execution can fall through fail
code.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/sapenc.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
index 87a834a8d8..0567a754e2 100644
--- a
Michael Niedermayer write:
> On Thu, Jul 10, 2025 at 10:20:45AM +0800, Lidong Yan wrote:
> > In sap_write_header(), ff_format_set_url() assign new allocated new_url
> > to contexts[i]->url but forgot to free it later. Add for loop to free
> > contexts[i]->url before a
to_phase() failed, which in turn means that memory
in h[longer] has not been allocated yet. To fix this leak, add
av_free(h[longer]) in av_calloc() failed branch would be enough.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavfilter/asrc_sinc.c | 4 +++-
1 file changed, 3 in
Michael Niedermayer writes:
>
> contexts will be NULL so i would assume contexts[i] will segfault
>
> thx
>
Sorry and you are right. Gonna fix.
Thanks,
Lidong
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ff
Michael Niedermayer writes:
> This is not correct
>
> build_huff() does not set these when fsym >= 0
>
> your patch runs free() on random uninitialized variables
>
> before submitting memleak fixes, please verify that
> 1. there is actually a leak
> 2. your patch does not introduce a new anomaly
+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b
XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk=
=rP+W
-END PGP PUBLIC KEY BLOCK-
Lidong Yan (3):
avfilter/asrc_sinc: fix leak in config_input()
avformat/sapenc: fix leak in sap_write_header()
avformat/sapenc: reword fail to cleanup in
ith goto cleanup to prevent from leaks.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavfilter/asrc_sinc.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c
index 6ff3303316..05cf53fe
normal execution can fall through cleanup
code.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/sapenc.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
index 87a834a8d8..0882690ba5 100644
--- a/libavfor
In sap_write_header(), normal execution would fall through to fail
labeled code, thus cleanup would be a better name compared to fail.
Replace the use of fail label with cleanup label.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/sapenc.
_info.
Add new test cases in t/t4216-log-bloom.sh to ensure
- consistent results between the optimization for multiple pathspec
items using bloom filter and the case without bloom filter
optimization.
- does not use bloom filter if any pathspec item is not literal.
Signed-off-by: Lidon
() is added to
initialize a key in keyvec.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
bloom.c| 31 +++
bloom.h| 20
revision.c | 36 ++--
revision.h | 6 +++---
4 files changed, 72 inse
This series enables bloom filter optimization for multiple pathspec
elements. Compared to v2, v3 fixed bugs in forbid_bloom_filter() and
add one more test case in t/t4216-log-bloom.sh.
Lidong Yan (2):
bloom: replace struct bloom_key * with struct bloom_keyvec
bloom: optimize multiple pathspec
Sorry, I filled in the wrong recipient address. Please forgive me and ignore
this email.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ..
+6ozWxAQC9OFisWrP/hHXUfj8AnC39r5pf5fEBz7lHvFgWNk2b
XwD7Bl6kvIIW7ReqtgXvcl7u78vEo+e9YeTGTlmAogjpeQk=
=rP+W
-END PGP PUBLIC KEY BLOCK-
Lidong Yan (5):
avcodec/utvideodec: fix leaks in decode_plane() and decode_plane10()
avformat/rtpdec_latm: fix leak in parse_fmtp_config()
swscale/graph: fix
-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavcodec/utvideodec.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 4c0fa2ca67..f15d623462 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvide
av_mallocz() allocates memory in config, but we forget to free it
if init_get_bits() failed. Replace return ret with goto end.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/rtpdec_latm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libav
This patch series fix multiple memory leaks in error path and early
return point.
Lidong Yan (5):
avcodec/utvideodec: fix leaks in decode_plane() and decode_plane10()
avformat/rtpdec_latm: fix leak in parse_fmtp_config()
swscale/graph: fix leak in adapt_colors()
avcodec/sunrast: fix leak
In adapt_colors(), ff_sws_lut3d_generate() allocates memory in lut.
However if add_legacy_sws_pass() failed, lut leaks. free lut before
return ret.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libswscale/graph.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
In sunrast_decode_frame(), we use av_malloc_array() allocates memory
to ptr and ptr2. However if buf_end - buf < 1, this function returns
error code without freeing this memory thus cause a leak. Add av_freep()
before return.
Signed-off-by: Lidong Yan <502024330...@smail.nju.
In ff_wms_parse_sdp_a_line(), it allocates memory in buf, but doesn't
free buf when avformat_alloc_context() failed. Add av_free(buf) before
return to prevent from leak.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
---
libavformat/rtpdec_asf.c | 4 +++-
1 file changed, 3
Michael Niedermayer writes:
> failure of av_tx_init() with your patch results in a leak:
>
I send a new patch in
https://ffmpeg.org/pipermail/ffmpeg-devel/2025-June/345932.html
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/ma
Michael Niedermayer wrote:
> failure of av_tx_init() with your patch results in a leak:
>
> ==3653806== 1,260 bytes in 1 blocks are definitely lost in loss record 6
> of 14
> ==3653806==at 0x483E0F0: memalign (in
> /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==3653
ith goto cleanup to prevent from leaks.
Signed-off-by: Lidong Yan <502024330...@smail.nju.edu.cn>
-BEGIN PGP PUBLIC KEY BLOCK-
mDMEaEpkmRYJKwYBBAHaRw8BAQdAGwGqH/Dwod+i6kR0/Rhn5GanJ7wK8mM9tWP/
W2qu8Ti0HTUwMjAyNDMzMDA1NkBzbWFpbC5uanUuZWR1LmNuiJkEExYKAEEWIQQC
zskBcOehk1y8G
Michael Niedermayer writes:
> > +cleanup:
> > +av_free(h[longer]);
> > return 0;
>
> this is not the correct return code
>
Sorry about that, gonna fix.
Thanks,
Lidong
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/ma
41 matches
Mail list logo