diff options
author | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-10-03 09:11:16 +0000 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2008-10-03 09:11:16 +0000 |
commit | 67030c152bdaae04c9cb92cd5ef323454047b835 (patch) | |
tree | a02ab13325a54958fc31ea9d258598d9b5aeab53 /gst/mpegtsparse | |
parent | 2d9d036a18f1d9aa8c5348a570168cdc87ab8642 (diff) | |
download | gst-plugins-bad-67030c152bdaae04c9cb92cd5ef323454047b835.tar.gz gst-plugins-bad-67030c152bdaae04c9cb92cd5ef323454047b835.tar.bz2 gst-plugins-bad-67030c152bdaae04c9cb92cd5ef323454047b835.zip |
gst/mpegtsparse/mpegtsparse.c: Fix possible crash where pat is pointing to a freed structure.
Original commit message from CVS:
* gst/mpegtsparse/mpegtsparse.c:
Fix possible crash where pat is pointing to a freed structure.
Diffstat (limited to 'gst/mpegtsparse')
-rw-r--r-- | gst/mpegtsparse/mpegtsparse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/mpegtsparse/mpegtsparse.c b/gst/mpegtsparse/mpegtsparse.c index 3ac66c7a..3aa49db5 100644 --- a/gst/mpegtsparse/mpegtsparse.c +++ b/gst/mpegtsparse/mpegtsparse.c @@ -248,8 +248,9 @@ mpegts_parse_reset (MpegTSParse * parse) /* PAT */ g_hash_table_insert (parse->psi_pids, GINT_TO_POINTER (0), GINT_TO_POINTER (1)); - + parse->pat = NULL; /* pmt pids will be added and removed dynamically */ + } static void @@ -290,8 +291,10 @@ mpegts_parse_finalize (GObject * object) MpegTSParse *parse = GST_MPEGTS_PARSE (object); g_free (parse->program_numbers); - if (parse->pat) + if (parse->pat) { gst_structure_free (parse->pat); + parse->pat = NULL; + } g_hash_table_destroy (parse->programs); g_hash_table_destroy (parse->psi_pids); |