diff options
author | Vineeth TM <vineeth.tm@samsung.com> | 2015-10-12 10:48:23 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-10-20 10:14:20 +0300 |
commit | 232a97aeb882f8f374364245975982ebc2677720 (patch) | |
tree | b17a4d0f9b89f895abf677cf888390e8f7376339 | |
parent | 24675193c23d4ed85c4d6b08c2ba8ae9bf3aec35 (diff) | |
download | gstreamer-plugins-good-232a97aeb882f8f374364245975982ebc2677720.tar.gz |
mpegaudioparse: Fix buffer memory leak during failures
mapped buffer is not being unmapped during failures
https://bugzilla.gnome.org/show_bug.cgi?id=756231
-rw-r--r-- | gst/audioparsers/gstmpegaudioparse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c index 51421cf68..ba4441d9c 100644 --- a/gst/audioparsers/gstmpegaudioparse.c +++ b/gst/audioparsers/gstmpegaudioparse.c @@ -435,7 +435,7 @@ gst_mp3parse_validate_extended (GstMpegAudioParse * mp3parse, GstBuffer * buf, if (G_UNLIKELY (!bpf)) { GST_DEBUG_OBJECT (mp3parse, "next header invalid (bitrate 0)"); *valid = FALSE; - return TRUE; + goto cleanup; } offset += bpf; @@ -673,7 +673,7 @@ gst_mpeg_audio_parse_handle_frame (GstBaseParse * parse, /* not enough data */ gst_base_parse_set_min_frame_size (parse, valid); *skipsize = 0; - return FALSE; + goto cleanup; } else { GST_DEBUG_OBJECT (parse, "determined freeform size %d", valid); mp3parse->freerate = valid; @@ -685,7 +685,7 @@ gst_mpeg_audio_parse_handle_frame (GstBaseParse * parse, if (!bpf) { /* did not come up with valid freeform length, reject after all */ *skipsize = 1; - return FALSE; + goto cleanup; } } |