1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

fixed(?) a memory leak: lost headers of stream because of wrong ref counter in associated refbuf objects. I HATE refbuf.

svn path=/icecast/trunk/icecast/; revision=19054
This commit is contained in:
Philipp Schafft 2014-01-12 21:09:04 +00:00
parent c9b6d627ab
commit 518ec953f7
2 changed files with 4 additions and 4 deletions

View File

@ -121,7 +121,6 @@ void format_ogg_free_headers (ogg_state_t *ogg_info)
{
refbuf_t *to_release = header;
header = header->next;
to_release->next = NULL;
refbuf_release (to_release);
}
ogg_info->header_pages = NULL;

View File

@ -70,11 +70,12 @@ static void refbuf_release_associated (refbuf_t *ref)
{
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 @@ void refbuf_release(refbuf_t *self)
{
refbuf_release_associated (self->associated);
if (self->next)
DEBUG0 ("next not null");
ERROR0 ("next not null");
free(self->data);
free(self);
}