GNOME Bugzilla – Bug 736313
GList node not freed
Last modified: 2014-10-09 23:40: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.
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).
Created attachment 285721 [details] [review] made changes as suggested ok. I have made changes and addded a patch for same.
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.
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>
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.
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
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.
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