summaryrefslogtreecommitdiffstats
path: root/g13
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-12-14 10:42:27 +0100
committerWerner Koch <wk@gnupg.org>2016-02-13 17:06:39 +0100
commit6390beca54f55e8d36ff767b99ae9ff68b15f10e (patch)
tree706692d45d88faafea3a0b2adfb31a96cd1cd9ce /g13
parentg13: Switch over to common/exectool.c. (diff)
downloadgnupg2-6390beca54f55e8d36ff767b99ae9ff68b15f10e.tar.xz
gnupg2-6390beca54f55e8d36ff767b99ae9ff68b15f10e.zip
g13: Fix releasing of a syshelp context.
* g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g13')
-rw-r--r--g13/call-syshelp.c9
1 files 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;
+ }
}