aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/bigcrypt.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2022-08-16 22:06:15 -0700
committerSteve Langasek <steve.langasek@canonical.com>2022-08-16 22:06:15 -0700
commit99d0d1c5c4f07332daa86e73981267a761bc966e (patch)
treea56fe41110023676d7082028cbaa47ca4b6e6164 /modules/pam_unix/bigcrypt.c
parentf6d08ed47a3da3c08345bce2ca366e961c52ad7c (diff)
parent40f7d85f3736d058c26de1dafa4fed46de7d75ef (diff)
downloadpam-99d0d1c5c4f07332daa86e73981267a761bc966e.tar.gz
pam-99d0d1c5c4f07332daa86e73981267a761bc966e.tar.bz2
pam-99d0d1c5c4f07332daa86e73981267a761bc966e.zip
New upstream version 1.5.2
Diffstat (limited to 'modules/pam_unix/bigcrypt.c')
-rw-r--r--modules/pam_unix/bigcrypt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c
index e08e4098..d8d61a4b 100644
--- a/modules/pam_unix/bigcrypt.c
+++ b/modules/pam_unix/bigcrypt.c
@@ -29,9 +29,7 @@
#include <string.h>
#include <stdlib.h>
#include <security/_pam_macros.h>
-#ifdef HAVE_LIBXCRYPT
-#include <xcrypt.h>
-#elif defined(HAVE_CRYPT_H)
+#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
@@ -111,6 +109,9 @@ char *bigcrypt(const char *key, const char *salt)
#endif
if (tmp_ptr == NULL) {
free(dec_c2_cryptbuf);
+#ifdef HAVE_CRYPT_R
+ free(cdata);
+#endif
return NULL;
}
/* and place in the static area */
@@ -137,6 +138,9 @@ char *bigcrypt(const char *key, const char *salt)
if (tmp_ptr == NULL) {
_pam_overwrite(dec_c2_cryptbuf);
free(dec_c2_cryptbuf);
+#ifdef HAVE_CRYPT_R
+ free(cdata);
+#endif
return NULL;
}