summaryrefslogtreecommitdiffhomepage
path: root/svr-authpam.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2012-02-22 22:05:24 +0800
committerMatt Johnston <matt@ucc.asn.au>2012-02-22 22:05:24 +0800
commitf403c1f18befd451f86cca2c2cd734ff35422c63 (patch)
treeaa9d5e934a703f9ae11819f4c68ce93559558abe /svr-authpam.c
parentff5d94a7a4fee69c0bedff130e6d6df258f4237f (diff)
- Fix minor leak
Diffstat (limited to 'svr-authpam.c')
-rw-r--r--svr-authpam.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/svr-authpam.c b/svr-authpam.c
index f230be7..e84f076 100644
--- a/svr-authpam.c
+++ b/svr-authpam.c
@@ -56,11 +56,7 @@ pamConvFunc(int num_msg,
struct UserDataS* userDatap = (struct UserDataS*) appdata_ptr;
unsigned int msg_len = 0;
unsigned int i = 0;
-
- const char* message = (*msg)->msg;
-
- /* make a copy we can strip */
- char * compare_message = m_strdup(message);
+ char * compare_message = NULL;
TRACE(("enter pamConvFunc"))
@@ -71,15 +67,10 @@ pamConvFunc(int num_msg,
dropbear_log(LOG_INFO, "pamConvFunc() called with >1 messages: not supported.");
return PAM_CONV_ERR;
}
-
- TRACE(("msg_style is %d", (*msg)->msg_style))
- if (compare_message) {
- TRACE(("message is '%s'", compare_message))
- } else {
- TRACE(("null message"))
- }
-
+ /* make a copy we can strip */
+ compare_message = m_strdup((*msg)->msg);
+
/* Make the string lowercase. */
msg_len = strlen(compare_message);
for (i = 0; i < msg_len; i++) {