From 5923f5d47f7a4b8f1b809e3ff7e0a6bd2a771d96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Sun, 27 Jul 2014 10:32:55 +0200 Subject: [PATCH] Do not free empty plugin slots --- klgd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/klgd.c b/klgd.c index 4238fbf..d9cfe82 100644 --- a/klgd.c +++ b/klgd.c @@ -117,6 +117,9 @@ void klgd_deinit(struct klgd_main *ctx) for (idx = 0; idx < priv->plugin_count; idx++) { struct klgd_plugin *plugin = priv->plugins[idx]; + if (!plugin) + continue; + plugin->deinit(plugin); kfree(plugin); } -- 2.43.5