[WGID-279204] Fix a potential memory leak problem
[platform/core/connectivity/zigbee-manager.git] / zigbee-daemon / zigbee-lib / src / zblib_service.c
index 045b651..61b2025 100644 (file)
@@ -424,6 +424,7 @@ gboolean zblib_service_load_plugins(ZigBeeService *service, const char *plugin_p
                /* Create new plug-in */
                plugin = zblib_plugin_new(service, filename, descriptor, handle);
                if (G_UNLIKELY(NULL == plugin)) {
+                       dlclose(handle);
                        g_free(filename);
                        continue;
                }