[xiph-commits] r19054 - icecast/trunk/icecast/src
ph3-der-loewe at svn.xiph.org
ph3-der-loewe at svn.xiph.org
Sun Jan 12 13:09:04 PST 2014
Author: ph3-der-loewe
Date: 2014-01-12 13:09:04 -0800 (Sun, 12 Jan 2014)
New Revision: 19054
Modified:
icecast/trunk/icecast/src/format_ogg.c
icecast/trunk/icecast/src/refbuf.c
Log:
fixed(?) a memory leak: lost headers of stream because of wrong ref counter in associated refbuf objects. I HATE refbuf.
Modified: icecast/trunk/icecast/src/format_ogg.c
===================================================================
--- icecast/trunk/icecast/src/format_ogg.c 2014-01-12 12:29:27 UTC (rev 19053)
+++ icecast/trunk/icecast/src/format_ogg.c 2014-01-12 21:09:04 UTC (rev 19054)
@@ -121,7 +121,6 @@
{
refbuf_t *to_release = header;
header = header->next;
- to_release->next = NULL;
refbuf_release (to_release);
}
ogg_info->header_pages = NULL;
Modified: icecast/trunk/icecast/src/refbuf.c
===================================================================
--- icecast/trunk/icecast/src/refbuf.c 2014-01-12 12:29:27 UTC (rev 19053)
+++ icecast/trunk/icecast/src/refbuf.c 2014-01-12 21:09:04 UTC (rev 19054)
@@ -70,11 +70,12 @@
{
if (ref == NULL)
return;
- while (ref && ref->_count == 1)
+ while (ref)
{
refbuf_t *to_go = ref;
ref = to_go->next;
- to_go->next = NULL;
+ if ( to_go->_count == 1 )
+ to_go->next = NULL;
refbuf_release (to_go);
}
}
@@ -88,7 +89,7 @@
{
refbuf_release_associated (self->associated);
if (self->next)
- DEBUG0 ("next not null");
+ ERROR0 ("next not null");
free(self->data);
free(self);
}
More information about the commits
mailing list