From d6adb1a32912c65752b6163f2914faa0d42a3e74 Mon Sep 17 00:00:00 2001 From: Vasyl Vavrychuk Date: Wed, 15 Sep 2021 09:50:29 +0200 Subject: Freeing main argv is not needed and must not be done. Was getting: free(): invalid pointer Bug-AGL: SPEC-4148 Change-Id: I81bc58f647c0d4cb57a2d1bd7cecb80e943c05d2 Signed-off-by: Vasyl Vavrychuk --- app/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main.cpp b/app/main.cpp index 62ea3a0..d84ca26 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -677,7 +677,7 @@ int main(int argc, char *argv[]) GstElement *pipeline = gst_parse_launch(pipeline_str, &error); if (error || !pipeline) { fprintf(stderr, "gstreamer pipeline construction failed!\n"); - free(argv); + free(gargv); return EXIT_FAILURE; } @@ -700,7 +700,7 @@ int main(int argc, char *argv[]) window = create_window(display, WINDOW_WIDTH_SIZE, WINDOW_HEIGHT_SIZE, app_id); if (!window) { - free(argv); + free(gargv); return EXIT_FAILURE; } @@ -731,7 +731,7 @@ int main(int argc, char *argv[]) destroy_window(window); destroy_display(display); - free(argv); + free(gargv); gst_element_set_state(pipeline, GST_STATE_NULL); gst_object_unref(pipeline); -- cgit 1.2.3-korg