mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/wavparse/gstwavparse.c: Set variable to NULL after freeing it to prevent double frees or make failures by another...
Original commit message from CVS: Based on a patch by: Victor STINNER <victor dot stinner at haypocalc dot com> * gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers): Set variable to NULL after freeing it to prevent double frees or make failures by another use of it afterwards more obvious and fix use of it after the freeing.
This commit is contained in:
parent
505878c022
commit
a3b9fddd77
2 changed files with 12 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-01-19 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
Based on a patch by:
|
||||
Victor STINNER <victor dot stinner at haypocalc dot com>
|
||||
|
||||
* gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers):
|
||||
Set variable to NULL after freeing it to prevent double frees
|
||||
or make failures by another use of it afterwards more obvious
|
||||
and fix use of it after the freeing.
|
||||
|
||||
2008-01-18 Thijs Vermeir <thijsvermeir@gmail.com>
|
||||
|
||||
* gst/udp/gstmultiudpsink.c:
|
||||
|
|
|
@ -1140,6 +1140,7 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
wav->vbr = FALSE;
|
||||
|
||||
g_free (header);
|
||||
header = NULL;
|
||||
|
||||
/* do format specific handling */
|
||||
switch (wav->format) {
|
||||
|
@ -1381,8 +1382,7 @@ invalid_blockalign:
|
|||
{
|
||||
GST_ELEMENT_ERROR (wav, STREAM, FAILED, (NULL),
|
||||
("Stream claims blockalign = %u, which is more than %u - invalid data",
|
||||
header->blockalign,
|
||||
header->channels * (guint) ceil (header->size / 8.0)));
|
||||
wav->blockalign, wav->channels * (guint) ceil (wav->depth / 8.0)));
|
||||
g_free (codec_name);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue