diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-06-08 15:06:30 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-06-08 15:28:51 +0200 |
commit | c859cfb399dc00dee24e02dd3acd40d40954c290 (patch) | |
tree | 0179e9fc91f2103afc82f4b0b4529b21d2365132 | |
parent | f8e02042cf5392278c41e4714fc051175da8f7fd (diff) | |
download | libpam-x2go-c859cfb399dc00dee24e02dd3acd40d40954c290.tar.gz libpam-x2go-c859cfb399dc00dee24e02dd3acd40d40954c290.tar.bz2 libpam-x2go-c859cfb399dc00dee24e02dd3acd40d40954c290.zip |
tests/mock_pam.c: Don't leak memory pointed to by 'response'.
-rw-r--r-- | tests/mock_pam.c | 3 |
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; |