]> Devoid-pointer.net GitWeb - KLGD.git/commitdiff
Check fur null pointers in klgd_deinit()
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 27 Aug 2014 10:01:42 +0000 (12:01 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 27 Aug 2014 10:01:42 +0000 (12:01 +0200)
klgd.c

diff --git a/klgd.c b/klgd.c
index 75b40833a1fdc8f36309b96ae912e156f14e40c5..a7c03af0786b251288db6c169d3713da0af86180 100644 (file)
--- a/klgd.c
+++ b/klgd.c
@@ -210,6 +210,12 @@ void klgd_deinit(struct klgd_main *ctx)
        struct klgd_main_private *priv = ctx->private;
        size_t idx;
 
+       if (!ctx)
+               return;
+       if (!ctx->private)
+               return;
+       priv = ctx->private;
+
        cancel_delayed_work(&priv->work);
        flush_workqueue(priv->wq);
        destroy_workqueue(priv->wq);