From: Michal MalĂ˝ Date: Wed, 27 Aug 2014 10:01:42 +0000 (+0200) Subject: Check fur null pointers in klgd_deinit() X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=f948bc368c0e08a87e77cc775ec4a872105d1fa8;p=KLGD.git Check fur null pointers in klgd_deinit() --- diff --git a/klgd.c b/klgd.c index 75b4083..a7c03af 100644 --- 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);