]> git.tue.mpg.de Git - paraslash.git/commitdiff
server: Free audio file header on exit.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 2 Jan 2018 23:05:06 +0000 (00:05 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Mar 2018 02:28:57 +0000 (03:28 +0100)
This fixes a harmless memory leak which occurs when para_server terminates
while a header stream is active.

vss.c

diff --git a/vss.c b/vss.c
index 55eaf2eb0525d402dad6d3b47afb3e8b0241dad3..0a1ac525abc8389ef6d7f1ed1817d9fbc0dd664a 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -1084,8 +1084,10 @@ static int vss_post_select(struct sched *s, void *context)
        struct vss_task *vsst = context;
 
        ret = task_get_notification(vsst->task);
-       if (ret < 0)
+       if (ret < 0) {
+               afh_free_header(vsst->header_buf, mmd->afd.audio_format_id);
                return ret;
+       }
        if (!vsst->map || vss_next() || vss_paused() || vss_repos()) {
                /* shut down senders and fec clients */
                struct fec_client *fc, *tmp;