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 736313 - GList node not freed
GList node not freed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
1.x
Other Linux
: Normal normal
: 1.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-09 09:05 UTC by Anuj
Modified: 2014-10-09 23:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GList nodes not freed. (974 bytes, patch)
2014-09-09 09:05 UTC, Anuj
needs-work Details | Review
made changes as suggested (999 bytes, patch)
2014-09-09 09:41 UTC, Anuj
none Details | Review
GList criticals nodes freed (827 bytes, patch)
2014-09-09 11:17 UTC, Anuj
needs-work Details | Review
gst-validate-runner: patch to free nodes of criticals (827 bytes, patch)
2014-09-10 05:57 UTC, Anuj
none Details | Review
validate: mishandled pointer criticals. (807 bytes, patch)
2014-09-29 05:21 UTC, Anuj
committed Details | Review

Description Anuj 2014-09-09 09:05:55 UTC
Created attachment 285720 [details] [review]
GList nodes not freed.

In gst-devtools:
validate/gst/validate;
gst-validate-runner.c the GList nodes need to be freed after use I am not sure about the node data.
I am adding a patch for same, make me correct if I am wrong.
Comment 1 Thibault Saunier 2014-09-09 09:28:22 UTC
Review of attachment 285720 [details] [review]:

Please could you provide a patch that only frees the GList of criticals issues.

::: validate/gst/validate/gst-validate-runner.c
@@ +178,3 @@
     }
     count++;
+    g_list_free (tmp);

That does not sound correct to me as we do not own the list here, the Runner does.

@@ +195,3 @@
   gst_validate_printf (NULL, "Pipeline finished, issues found: %u\n", count);
   return ret;
+  g_list_free (criticals);

That's correct indeed.

@@ +196,3 @@
   return ret;
+  g_list_free (criticals);
+  g_list_free (iter);

The iter should not be freed (it will be NULL at that point anyway).
Comment 2 Anuj 2014-09-09 09:41:48 UTC
Created attachment 285721 [details] [review]
made changes as suggested 

ok. I have made changes and addded a patch for same.
Comment 3 Anuj 2014-09-09 11:17:26 UTC
Created attachment 285729 [details] [review]
GList criticals nodes freed

Ignore the previous patch of comment 2. 
g_free_list(criticals) should be above the return.
Comment 4 Thiago Sousa Santos 2014-09-09 20:16:02 UTC
Review of attachment 285729 [details] [review]:

Please make a single patch instead of patching against your latest patch. This makes the development log cleaner.

Also, use a better commit message. We usually have a short title with the name of the target component.

gst-validate-runner: <short title>

<long message>

<bug link>
Comment 5 Anuj 2014-09-10 05:57:16 UTC
Created attachment 285789 [details] [review]
gst-validate-runner: patch to free nodes of criticals

thanks for your suggestions thiago, made changes as suggested. Please review.
Comment 6 Luis de Bethencourt 2014-09-24 09:28:17 UTC
Anuj,

Please follow the format Thiago suggests. You have to edit the commit message when creating the commit to match the commits you can see in git log.

gst-validate-runner: <short title>

<long message>

<bug link>



For example (from gstreamer core 7a93e6b005ed821b62a0e02361752dc441c17f37):

gsturi: Remove unnecessary code
    
gst_uri_handler_set_uri() function has new_uri, location and colon
are not necessary, they can be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=736877
Comment 7 Anuj 2014-09-29 05:21:48 UTC
Created attachment 287318 [details] [review]
validate: mishandled pointer criticals.

made changes as suggested gst-validate-runner.c has one mishandling of pointer criticals. Please review.
Comment 8 Thiago Sousa Santos 2014-10-09 23:39:56 UTC
commit 83c0453d81827f3680f3c67aa6cefae7fecc17e3
Author: Anuj Jaiswal <anuj.jaiswal@samsung.com>
Date:   Mon Sep 29 10:22:55 2014 +0530

    validate: mishandled pointer criticals
    
    Free glist of criticals
    
    Signed-off-by: Anuj Jaiswal <anuj.jaiswal@samsung.com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736313