Tahseen Mohammad
2006-Jun-07 01:13 UTC
[Vorbis-dev] oggdec not freeing memory when outfilename is not specified.
Index: oggdec/oggdec.c ==================================================================--- oggdec/oggdec.c (revision 11531) +++ oggdec/oggdec.c (working copy) @@ -409,6 +409,8 @@ if(!infile) return 1; outfile = open_output(out); + if (!outfilename) + free(out); if(!outfile) { fclose(infile); return -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20060607/31c5e8ff/attachment.html
Michael Smith
2006-Jun-07 01:54 UTC
[Vorbis-dev] oggdec not freeing memory when outfilename is not specified.
On 6/7/06, Tahseen Mohammad <tahseen.mohammad@gmail.com> wrote:> Index: oggdec/oggdec.c > ==================================================================> --- oggdec/oggdec.c (revision 11531) > +++ oggdec/oggdec.c (working copy) > @@ -409,6 +409,8 @@ > if(!infile) > return 1; > outfile = open_output(out); > + if (!outfilename) > + free(out); > if(!outfile) { > fclose(infile); > returnThanks, I committed this with the free moved a few lines further down, so that it doesn't get used after freeing. Mike