]> Devoid-pointer.net GitWeb - KLGD.git/commitdiff
Do not free empty plugin slots
authorMichal Malý <madcatxster@devoid-pointer.net>
Sun, 27 Jul 2014 08:32:55 +0000 (10:32 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sun, 27 Jul 2014 08:32:55 +0000 (10:32 +0200)
klgd.c

diff --git a/klgd.c b/klgd.c
index 4238fbf222992f38d8322bbedc4e7c503c916e2c..d9cfe821935a964c2243ae26d0f61fd5a4496ad3 100644 (file)
--- 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);
        }