1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

Fix segv.

This commit is contained in:
Werner Koch 2009-03-03 12:02:42 +00:00
parent 1ade5ed150
commit 2749c6bcd9
2 changed files with 8 additions and 1 deletions

View File

@ -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> 2009-02-27 Werner Koch <wk@g10code.com>
* app.c (get_supported_applications): New. * app.c (get_supported_applications): New.

View File

@ -1857,6 +1857,7 @@ scd_command_handler (ctrl_t ctrl, int fd)
{ {
int rc; int rc;
assuan_context_t ctx; assuan_context_t ctx;
int stopme;
if (fd == -1) if (fd == -1)
{ {
@ -1942,13 +1943,14 @@ scd_command_handler (ctrl_t ctrl, int fd)
BUG (); BUG ();
sl->next_session = ctrl->server_local->next_session; sl->next_session = ctrl->server_local->next_session;
} }
stopme = ctrl->server_local->stopme;
xfree (ctrl->server_local); xfree (ctrl->server_local);
ctrl->server_local = NULL; ctrl->server_local = NULL;
/* Release the Assuan context. */ /* Release the Assuan context. */
assuan_deinit_server (ctx); assuan_deinit_server (ctx);
if (ctrl->server_local->stopme) if (stopme)
scd_exit (0); scd_exit (0);
/* If there are no more sessions return true. */ /* If there are no more sessions return true. */