]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - ogg_afh.c
ogg_afh.c: Fix a memory leak.
[paraslash.git] / ogg_afh.c
index 1c0c63234e0837457fc3e8e79138c11367884494..ef7d4f75029b3cf1f7525a8cab55195bb05f101d 100644 (file)
--- a/ogg_afh.c
+++ b/ogg_afh.c
@@ -133,8 +133,11 @@ static int ogg_compute_header_len(char *map, size_t numbytes,
        memcpy(buf, map, len);
        ogg_sync_wrote(sync_in, (long)len);
        ret = -E_SYNC_PAGEOUT;
-       if (ogg_sync_pageout(sync_in, &page) <= 0)
+       if (ogg_sync_pageout(sync_in, &page) <= 0) {
+               free(stream_in);
+               free(stream_out);
                goto err1;
+       }
        serial = ogg_page_serialno(&page);
        ogg_stream_init(stream_in, serial);
        ogg_stream_init(stream_out, serial);