summaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-03-03 13:02:42 +0100
committerWerner Koch <wk@gnupg.org>2009-03-03 13:02:42 +0100
commit2749c6bcd9e1f2ba629a6a4794dba1bddd3f7c0d (patch)
tree16746bd02af04ff3024b2ed77f2108f54c4ff8de /scd/command.c
parentArgg again: Remove cruft from a test. (diff)
downloadgnupg2-2749c6bcd9e1f2ba629a6a4794dba1bddd3f7c0d.tar.xz
gnupg2-2749c6bcd9e1f2ba629a6a4794dba1bddd3f7c0d.zip
Fix segv.gnupg-2.0.11
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c
index 07a1e9b54..40bf2a292 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -1857,6 +1857,7 @@ scd_command_handler (ctrl_t ctrl, int fd)
{
int rc;
assuan_context_t ctx;
+ int stopme;
if (fd == -1)
{
@@ -1942,13 +1943,14 @@ scd_command_handler (ctrl_t ctrl, int fd)
BUG ();
sl->next_session = ctrl->server_local->next_session;
}
+ stopme = ctrl->server_local->stopme;
xfree (ctrl->server_local);
ctrl->server_local = NULL;
/* Release the Assuan context. */
assuan_deinit_server (ctx);
- if (ctrl->server_local->stopme)
+ if (stopme)
scd_exit (0);
/* If there are no more sessions return true. */