compositor: Cleanup if we can't find the symbol in the module
diff --git a/src/compositor.c b/src/compositor.c
index d6e833f..f6c94b6 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3055,6 +3055,7 @@
 	init = dlsym(module, entrypoint);
 	if (!init) {
 		weston_log("Failed to lookup init function: %s\n", dlerror());
+		dlclose(module);
 		return NULL;
 	}