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 792899 - gstreamer-sharp doesn't free string
gstreamer-sharp doesn't free string
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-sharp
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-25 13:56 UTC by Justin Kim
Modified: 2018-01-26 17:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix few leaks after strdup (4.12 KB, patch)
2018-01-25 13:56 UTC, Justin Kim
none Details | Review
Fix few leaks after strdup (4.94 KB, patch)
2018-01-26 03:51 UTC, Justin Kim
committed Details | Review

Description Justin Kim 2018-01-25 13:56:38 UTC
Created attachment 367421 [details] [review]
Fix few leaks after strdup

The string which is allocated by `GLib.Marshaller.StringToPtrGStrdup` should be freed.
Comment 1 Sebastian Dröge (slomo) 2018-01-25 14:38:38 UTC
Review of attachment 367421 [details] [review]:

::: sources/custom/Application.cs
@@ +51,3 @@
 			gst_init(ref cnt_argv, ref native_argv);
+			for (int i = 0; i < cnt_argv; i++)
+				GLib.Marshaller.Free (native_argv[i]);

While this is correct, this is not enough.

gst_init() can change the array, it removes all arguments that it handled itself. So you would be leaking those ones here
Comment 2 Justin Kim 2018-01-26 03:51:52 UTC
Created attachment 367451 [details] [review]
Fix few leaks after strdup
Comment 3 Sebastian Dröge (slomo) 2018-01-26 17:27:20 UTC
Attachment 367451 [details] pushed as 894fee3 - Fix few leaks after strdup