After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785435 - alawdec: Fix Memory leak in error case
alawdec: Fix Memory leak in error case
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.12.2
Other All
: Normal normal
: 1.12.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-26 08:58 UTC by Satya Prakash Gupta
Modified: 2017-08-11 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch file is attached. (797 bytes, patch)
2017-07-26 08:58 UTC, Satya Prakash Gupta
needs-work Details | Review
Updated patch is attached. (807 bytes, patch)
2017-07-27 03:55 UTC, Satya Prakash Gupta
committed Details | Review

Description Satya Prakash Gupta 2017-07-26 08:58:21 UTC
Created attachment 356406 [details] [review]
Patch file is attached.

File : gst-plugins-good/gst/law/alaw-decode.c

Function  gst_alaw_dec_handle_frame:

inmap unref is missing .


Solution : gst_buffer_unmap (buffer, &inmap);

++patch is attched for possible solution.

Kindly review the patch and provide your feedback.
Comment 1 Sebastian Dröge (slomo) 2017-07-26 09:35:59 UTC
Comment on attachment 356406 [details] [review]
Patch file is attached.

Patch seems ok, but please update the commit message: https://gstreamer.freedesktop.org/documentation/contribute/index.html#writing-good-commit-messages

It's also a definite leak on that error path, not a possible one.
Comment 2 Satya Prakash Gupta 2017-07-27 03:55:28 UTC
Created attachment 356453 [details] [review]
Updated patch is attached.
Comment 3 Sebastian Dröge (slomo) 2017-07-27 11:24:02 UTC
commit 4b8d0a294a60e1433ea60731c6ea4e911fc42f1c (HEAD -> master)
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Jul 27 14:21:34 2017 +0300

    mulawdec: Unmap input buffer if failing to map the output buffer

commit e3f6b9f36713f9272ae98a5984497cff75825884
Author: Satya Prakash Gupta <sp.gupta@samsung.com>
Date:   Thu Jul 27 09:22:25 2017 +0530

    alawdec: Fix Memory leak in error case
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785435