Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP client: fix the memory leak (temporary TCP sbuf)
  • Loading branch information
perexg committed Nov 18, 2015
1 parent a77fcb5 commit d912ecd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -882,7 +882,8 @@ satip_frontend_extra_shutdown
}

static void
satip_frontend_shutdown ( http_client_t *rtsp, tvhpoll_t *efd )
satip_frontend_shutdown
( satip_frontend_t *lfe, http_client_t *rtsp, tvhpoll_t *efd )
{
char b[32];
tvhpoll_event_t ev;
Expand Down Expand Up @@ -912,6 +913,7 @@ satip_frontend_shutdown ( http_client_t *rtsp, tvhpoll_t *efd )
break;
}
}
sbuf_free(&lfe->sf_sbuf);
}

static void
Expand Down Expand Up @@ -944,7 +946,7 @@ satip_frontend_close_rtsp
ev.data.ptr = NULL;
tvhpoll_rem(efd, &ev, 1);

satip_frontend_shutdown(*rtsp, efd);
satip_frontend_shutdown(lfe, *rtsp, efd);

memset(&ev, 0, sizeof(ev));
ev.events = TVHPOLL_IN;
Expand Down Expand Up @@ -1602,7 +1604,7 @@ satip_frontend_input_thread ( void *aux )
tvhpoll_rem(efd, ev, nfds);

if (exit_flag) {
satip_frontend_shutdown(rtsp, efd);
satip_frontend_shutdown(lfe, rtsp, efd);
http_client_close(rtsp);
rtsp = NULL;
}
Expand Down

0 comments on commit d912ecd

Please sign in to comment.