From f948bc368c0e08a87e77cc775ec4a872105d1fa8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Wed, 27 Aug 2014 12:01:42 +0200 Subject: [PATCH] Check fur null pointers in klgd_deinit() --- klgd.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.43.5