dvbinfo: Fix resource leak (CID: 17271)
[email protected] (Jean-Paul Saman) Wed, 16 Apr 2014 15:53:31 +0200 (CEST)
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvbpsi | branch: master | Jean-Paul Saman <[email protected]> | Fri Apr 11 15:09:34 2014 +0200| [63c868ec929fd07064fc216507487534f70261f2] | committer: Jean-Paul Saman dvbinfo: Fix resource leak (CID: 17271) The error path for dvbpsi_AttachDemux() in handle_atsc_MGT failed to release allocated resources. > http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=63c868ec929fd07064fc216507487534f70261f2 --- examples/dvbinfo/libdvbpsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/dvbinfo/libdvbpsi.c b/examples/dvbinfo/libdvbpsi.c index c502bcb..b31a920 100644 --- a/examples/dvbinfo/libdvbpsi.c +++ b/examples/dvbinfo/libdvbpsi.c @@ -1703,6 +1703,8 @@ static void handle_atsc_MGT(void *p_data, dvbpsi_atsc_mgt_t *p_mgt) if (!dvbpsi_AttachDemux(p->handle, handle_subtable, p_stream)) { fprintf(stderr, "dvbinfo: Failed to attach new ATSC EIT decoder\n"); + dvbpsi_delete(p->handle); + free(p); break; } _______________________________________________ libdvbpsi-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvbpsi-devel