Fix potential memory leak 93/27093/2
authorRongrong Yuan <yuanrr.fnst@fujitsu.com>
Thu, 20 Jan 2022 02:19:04 +0000 (10:19 +0800)
committerRongrong Yuan <yuanrr.fnst@fujitsu.com>
Thu, 20 Jan 2022 02:19:04 +0000 (10:19 +0800)
Bug-AGL: SPEC-4221

Signed-off-by: Rongrong Yuan <yuanrr.fnst@fujitsu.com>
Change-Id: I30634977a3b899647a5f2faad2c70db39e97d09e

src/compositor.c

index 2bbdce8..fd5f5a6 100644 (file)
@@ -1768,6 +1768,11 @@ int wet_main(int argc, char *argv[])
        wl_display_destroy_clients(display);
 
 error_compositor:
+       free(backend);
+       backend = NULL;
+       free(modules);
+       modules = NULL;
+
        weston_compositor_tear_down(ivi.compositor);
 
        weston_compositor_log_scope_destroy(log_scope);