summaryrefslogtreecommitdiffstats
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
parentArgg again: Remove cruft from a test. (diff)
downloadgnupg2-2749c6bcd9e1f2ba629a6a4794dba1bddd3f7c0d.tar.xz
gnupg2-2749c6bcd9e1f2ba629a6a4794dba1bddd3f7c0d.zip
Fix segv.gnupg-2.0.11
-rw-r--r--scd/ChangeLog5
-rw-r--r--scd/command.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog
index 1fd2de8c8..bcfd65b4a 100644
--- a/scd/ChangeLog
+++ b/scd/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-03 Werner Koch <wk@g10code.com>
+
+ * command.c (scd_command_handler): Remove dereference of STOPME
+ after free.
+
2009-02-27 Werner Koch <wk@g10code.com>
* app.c (get_supported_applications): New.
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. */