diff options
author | Werner Koch <[email protected]> | 2015-12-14 09:42:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-02-13 16:06:39 +0000 |
commit | 6390beca54f55e8d36ff767b99ae9ff68b15f10e (patch) | |
tree | 706692d45d88faafea3a0b2adfb31a96cd1cd9ce | |
parent | g13: Switch over to common/exectool.c. (diff) | |
download | gnupg-6390beca54f55e8d36ff767b99ae9ff68b15f10e.tar.gz gnupg-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 <[email protected]>
-rw-r--r-- | g13/call-syshelp.c | 9 |
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; + } } |