GNOME Bugzilla – Bug 771488
find_media factory leak
Last modified: 2016-10-25 13:04:13 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.
Created attachment 335637 [details] valgrind report after patch
Created attachment 335638 [details] valgrind report with no patch
Created attachment 335639 [details] server to reproduce the bug
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