ogg.k.ogg.k at googlemail.com
2008-Jun-02 09:54 UTC
[ogg-dev] [PATCH] oggzinfo: fix a couple leaks
As the title says. Cheers -------------- next part -------------- A non-text attachment was scrubbed... Name: oggzinfo-leaks.diff Type: text/x-patch Size: 2591 bytes Desc: not available Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20080602/9e045616/attachment.bin
2008/6/2 ogg.k.ogg.k at googlemail.com <ogg.k.ogg.k at googlemail.com>:> As the title says. >thanks. I split it into two commits, the earlier of which could also be useful in other tools which use these skeleton.[ch] files: commit 2e783f3f1b342df2404882f4fef3481b528d935b Author: conrad <conrad at 8158c8cd-e7e1-0310-9fa4-c5954c97daef> Date: Mon Jun 2 10:07:14 2008 +0000 oggzinfo: remove memory leak from allocated message headers Patch by ogg.k.ogg.k git-svn-id: http://svn.annodex.net/liboggz/trunk at 3604 8158c8cd-e7e1-0310-9fa commit f175c1ca1a7ed34aeb6f70d9fbcb50200cf5fbde Author: conrad <conrad at 8158c8cd-e7e1-0310-9fa4-c5954c97daef> Date: Mon Jun 2 10:07:00 2008 +0000 add fisbone_clear() function, for deallocating message headers in a fisbone. This patch can be used more generally in code using skeleton.[ch] for avoiding memory leaks where message headers are read. Patch by ogg.k.ogg.k git-svn-id: http://svn.annodex.net/liboggz/trunk at 3603 8158c8cd-e7e1-0310-9fa cheers, Conrad.
ogg.k.ogg.k at googlemail.com
2008-Jun-02 10:38 UTC
[ogg-dev] [PATCH] oggzinfo: fix a couple leaks
> thanks. I split it into two commits, the earlier of which could also > be useful in other tools which use these skeleton.[ch] files:Yes - I only did it for that skeleton.[ch] but it might be an idea to move these into their own svn directory and pull it with an external, so they stop diverging. While there, I'd also suggest it could be useful to have a function like const char *find_header(const fishead_packet *fp, const char *name) which would be used as: const char *length = find_header(fp, "Content-Length"); if (length) printf("%d bytes", atoi(length)); as it's a bit unwieldy to use at the moment.