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 755862 - ges-project: leaks internal file info
ges-project: leaks internal file info
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-editing-services
git master
Other Linux
: Normal normal
: 1.6.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-30 08:53 UTC by Justin Kim
Modified: 2015-10-01 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[1/2] unref GFileInfo (1.19 KB, patch)
2015-09-30 08:53 UTC, Justin Kim
committed Details | Review
[2/2] fix wrong pointer access (779 bytes, patch)
2015-09-30 08:54 UTC, Justin Kim
committed Details | Review

Description Justin Kim 2015-09-30 08:53:24 UTC
GFileInfo should be freed after usage.
Comment 1 Justin Kim 2015-09-30 08:53:55 UTC
Created attachment 312409 [details] [review]
[1/2] unref GFileInfo
Comment 2 Justin Kim 2015-09-30 08:54:21 UTC
Created attachment 312410 [details] [review]
[2/2] fix wrong pointer access
Comment 3 Thibault Saunier 2015-09-30 09:59:03 UTC
Review of attachment 312409 [details] [review]:

::: ges/ges-project.c
@@ -271,3 +271,3 @@
   g_ptr_array_add (new_paths, g_strdup (value));
-  for (info = g_file_enumerator_next_file (fenum, NULL, NULL);
-      info; info = g_file_enumerator_next_file (fenum, NULL, NULL)) {
+  info = g_file_enumerator_next_file (fenum, NULL, NULL);
+  while (info != NULL) {

Why don't you simply unref and also change the loop style?
Comment 4 Thibault Saunier 2015-09-30 09:59:53 UTC
Review of attachment 312410 [details] [review]:

OK
Comment 5 Thibault Saunier 2015-09-30 10:02:41 UTC
commit 807437f9fe86b7ba961b663b4a8f9a2a10d0e129
Author: Justin Kim <justin.kim@collabora.com>
Date:   Wed Sep 30 17:27:26 2015 +0900

    project: fix a pointer for error message
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755862

commit ecb2a7c820f386e547e8ce2c52fe7001390dc1bd
Author: Justin Kim <justin.kim@collabora.com>
Date:   Wed Sep 30 17:26:31 2015 +0900

    project: don't leak GFileInfo
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755862