GNOME Bugzilla – Bug 785336
Memory leak in appsink-src.c & appsink-src2.c example apps
Last modified: 2017-08-07 19:26:58 UTC
Created attachment 356284 [details] [review] Patch file is attached. File : gst-plugins-base/tests/examples/app/appsink-src2.c & appsink-src.c Function main: Possible Leak occurs as previously strdup is not fixed also memory leak occurs. main (int argc, char *argv[]) if (!g_file_test (filename, G_FILE_TEST_EXISTS)) { g_print ("File %s does not exist\n", filename); return -1; } ++patch is attched for possible solution. Kindly review the patch and provide your feedback.
Thanks for the patch. I have pushed this now, but for the future please exclude everything under tests/* from your static analyzer runs. Exiting the application will clean up resources just fine, so it's arguable whether it really makes sense to add lines of codes to free stuff everywhere or if it just adds noise to the example code. commit 815e72e91f674dfbd3b6916872e9333d9183499d (HEAD -> master) Author: Satya Prakash Gupta <sp.gupta@samsung.com> Date: Mon Jul 24 13:56:16 2017 +0530 examples: fix memory leaks in appsrc and appsrc2 examples https://bugzilla.gnome.org/show_bug.cgi?id=785336