aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/mock_pam.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/mock_pam.c b/tests/mock_pam.c
index 10f2d80..88dc8d6 100644
--- a/tests/mock_pam.c
+++ b/tests/mock_pam.c
@@ -45,7 +45,10 @@ int fake_conv (int __attribute__((unused)) num_msg,
else if (strcmp((*msg)->msg, PAM_X2GO_PROMPT_COMMAND) == 0)
response->resp = strdup ("rcommand");
else
+ {
+ free(response);
return PAM_SYMBOL_ERR; /* leaks... */
+ }
*resp = response;