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 771488 - find_media factory leak
find_media factory leak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
1.8.2
Other Linux
: Normal normal
: 1.8.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-15 13:27 UTC by Kseniya Vasilchuk
Modified: 2016-10-25 13:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix memory leak in find_media (983 bytes, patch)
2016-09-15 13:27 UTC, Kseniya Vasilchuk
committed Details | Review
valgrind report after patch (1.47 KB, text/plain)
2016-09-15 13:30 UTC, Kseniya Vasilchuk
  Details
valgrind report with no patch (1.48 KB, text/plain)
2016-09-15 13:30 UTC, Kseniya Vasilchuk
  Details
server to reproduce the bug (6.60 KB, text/plain)
2016-09-15 13:31 UTC, Kseniya Vasilchuk
  Details

Description Kseniya Vasilchuk 2016-09-15 13:27:21 UTC
Created attachment 335636 [details] [review]
Fix memory leak in find_media

I found a memory leak in the case of authorization failed in "find_media" function, so I made the patch to fix it.

To be sure that leak exists and my patch is useful I did small research:
I took auth-server from examples with small changes in it (will be in attachment) and launched it with valgrind memcheck tool, at the same time I was making many connections to server with wrong user/password pair. So valgrind reported about the pretty big memory leak.
After that I recompile the server with my patch and did the same. I found that there is no leak anymore.

Both valgrind reports will be in attachment.
The patch is in attachment as well, please watch it.
Comment 1 Kseniya Vasilchuk 2016-09-15 13:30:18 UTC
Created attachment 335637 [details]
valgrind report after patch
Comment 2 Kseniya Vasilchuk 2016-09-15 13:30:50 UTC
Created attachment 335638 [details]
valgrind report with no patch
Comment 3 Kseniya Vasilchuk 2016-09-15 13:31:47 UTC
Created attachment 335639 [details]
server to reproduce the bug
Comment 4 Sebastian Dröge (slomo) 2016-10-20 11:02:01 UTC
commit ff657322707a91e84ba368356f06247daaa28243
Author: Nikita Bobkov <NikitaDBobkov@gmail.com>
Date:   Wed Sep 14 17:48:39 2016 +0300

    rtsp-client: Fix factory leaking in find_media() in error cases
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771488