diff --git a/libfwupdplugin/fu-plugin.c b/libfwupdplugin/fu-plugin.c index ca7b55829..539f8ea08 100644 --- a/libfwupdplugin/fu-plugin.c +++ b/libfwupdplugin/fu-plugin.c @@ -13,9 +13,6 @@ #include #include #include -#ifdef HAVE_VALGRIND -#include -#endif /* HAVE_VALGRIND */ #include "fu-context-private.h" #include "fu-device-private.h" @@ -2328,14 +2325,6 @@ fu_plugin_finalize (GObject *object) g_array_unref (priv->device_gtypes); g_free (priv->build_hash); g_free (priv->data); - /* Must happen as the last step to avoid prematurely - * freeing memory held by the plugin */ -#ifdef RUNNING_ON_VALGRIND - if (priv->module != NULL && RUNNING_ON_VALGRIND == 0) -#else - if (priv->module != NULL) -#endif - g_module_close (priv->module); G_OBJECT_CLASS (fu_plugin_parent_class)->finalize (object); }