From 6390beca54f55e8d36ff767b99ae9ff68b15f10e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 14 Dec 2015 10:42:27 +0100 Subject: g13: Fix releasing of a syshelp context. * g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg. Signed-off-by: Werner Koch --- g13/call-syshelp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/g13/call-syshelp.c b/g13/call-syshelp.c index 2086dd1db..545bc1ab5 100644 --- a/g13/call-syshelp.c +++ b/g13/call-syshelp.c @@ -119,6 +119,11 @@ start_syshelp (ctrl_t ctrl) void call_syshelp_release (ctrl_t ctrl) { - assuan_release (ctrl->syshelp_local->assctx); - ctrl->syshelp_local->assctx = NULL; + if (!ctrl) + return; + if (ctrl->syshelp_local) + { + assuan_release (ctrl->syshelp_local->assctx); + ctrl->syshelp_local->assctx = NULL; + } } -- cgit v1.2.3