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 743178 - pulsesink: Free format_info in query_getcaps
pulsesink: Free format_info in query_getcaps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.4.5
Other Linux
: Normal normal
: 1.4.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-19 13:07 UTC by Jimmy Ohn
Modified: 2015-01-27 05:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Free format_info in query_getcaps (420 bytes, patch)
2015-01-19 13:08 UTC, Jimmy Ohn
needs-work Details | Review
If we can not create probe stream in query_getcaps function, it will appear memory leakage. (582 bytes, text/plain)
2015-01-20 00:26 UTC, Jimmy Ohn
  Details
pulsesink: Free format_info in query_getcaps (582 bytes, patch)
2015-01-20 00:32 UTC, Jimmy Ohn
committed Details | Review

Description Jimmy Ohn 2015-01-19 13:07:17 UTC
If we can not create probe stream in query_getcaps function, it will appear memory leakage from format info I think. Also, for code readability, it should be merged i think.
The following patch prevent memory leakage in pulsesink.
Comment 1 Jimmy Ohn 2015-01-19 13:08:33 UTC
Created attachment 294873 [details] [review]
Free format_info in query_getcaps

Free format_info in query_getcaps
Comment 2 Thiago Sousa Santos 2015-01-19 13:55:45 UTC
Review of attachment 294873 [details] [review]:

Nice find, just one remark on the code.

Also, when submitting a new version please check previous gstreamer commit messages and follow the same style. Something like:


pulseseink: [title of the commit]

[description - multiple lines if needed]

[bug url]

::: ext/pulse/pulsesink.c
@@ +2170,1 @@
       goto unlock;

The code right after this also frees this object so it would be better to have the free happening before the if as it needs to be done for both branches.
Comment 3 Jimmy Ohn 2015-01-20 00:23:55 UTC
thank you for your comment. I have modified source code following your comment. here is the modified source patch.
Comment 4 Jimmy Ohn 2015-01-20 00:26:32 UTC
Created attachment 294937 [details]
If we can not create probe stream in query_getcaps function, it will appear memory leakage.
Comment 5 Jimmy Ohn 2015-01-20 00:32:10 UTC
Created attachment 294939 [details] [review]
pulsesink: Free format_info in query_getcaps 

If we can not create probe stream in query_getcaps function, it will appear
memory leakage from format info.
The following patch prevent memory leakage in pulsesink.

https://bugzilla.gnome.org/show_bug.cgi?id=743178
Comment 6 Jimmy Ohn 2015-01-21 13:37:24 UTC
5
Comment 7 Thiago Sousa Santos 2015-01-26 15:22:13 UTC
Pushed, thanks for the patch.

For future patches, please commit your work in your local tree and use "git format-patch" to create the patch to attach here. I had to copy your commit message manually as git didn't recognize it in the format your attached.

In master:
commit bf10d33b9b95856aabbc12dfa7c5ede50a27b38c
Author: Jimmy Ohn <yongjin.ohn@lge.com>
Date:   Tue Jan 20 00:32:00 2015 +0000

    pulsesink: Free format_info in query_getcaps
    
    If we can not create probe stream in query_getcaps function, it will appear
    memory leakage from format info.
    The following patch prevent memory leakage in pulsesink.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743178

In 1.4:
commit 56f5ae3f089e13b2593a52ec8fb22168dae96144
Author: Jimmy Ohn <yongjin.ohn@lge.com>
Date:   Tue Jan 20 00:32:00 2015 +0000

    pulsesink: Free format_info in query_getcaps
    
    If we can not create probe stream in query_getcaps function, it will appear
    memory leakage from format info.
    The following patch prevent memory leakage in pulsesink.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743178
Comment 8 Jimmy Ohn 2015-01-27 05:55:47 UTC
Oh.. I see. When I upload future patches, I will work in my local tree and upload it. thank you very much.:)