clutterfb.cpp: avoid possible memleak

This commit is contained in:
2019-07-03 14:51:12 +02:00
parent bc01e812e6
commit a3f7195688

View File

@@ -196,6 +196,7 @@ void GLFramebuffer::run()
hal_info("GLFB: GL thread starting x %d y %d\n", x, y); hal_info("GLFB: GL thread starting x %d y %d\n", x, y);
if (clutter_init(&argc, &argv) != CLUTTER_INIT_SUCCESS) { if (clutter_init(&argc, &argv) != CLUTTER_INIT_SUCCESS) {
hal_info("GLFB: error initializing clutter\n"); hal_info("GLFB: error initializing clutter\n");
free(argv);
return; return;
} }
hal_info("GLFB: %s:%d\n", __func__, __LINE__); hal_info("GLFB: %s:%d\n", __func__, __LINE__);
@@ -262,6 +263,7 @@ void GLFramebuffer::run()
clutter_timeline_start(tl); clutter_timeline_start(tl);
clutter_main(); clutter_main();
hal_info("GLFB: GL thread stopping\n"); hal_info("GLFB: GL thread stopping\n");
free(argv);
} }
/* static */ void GLFbPC::rendercb() /* static */ void GLFbPC::rendercb()