Fix for double free if incorrect password is passed

This commit is contained in:
Mark Riddoch
2014-09-24 11:13:33 +01:00
parent a82ea9def3
commit f3429dac1b
2 changed files with 19 additions and 12 deletions

View File

@ -30,13 +30,15 @@
* @endverbatim
*/
#include <dcb.h>
#include <spinlock.h>
/**
* The telnetd specific protocol structure to put in the DCB.
*/
typedef struct maxscaled {
int state; /**< The connection state */
char *username; /**< The login name of the user */
SPINLOCK lock; /**< Protocol structure lock */
int state; /**< The connection state */
char *username; /**< The login name of the user */
} MAXSCALED;
#define MAXSCALED_STATE_LOGIN 1 /**< Issued login prompt */