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:11:24 -0700
commit7561896529a7af05201dc31e959a05897ef99e19 (patch)
tree14514b088f45d4fecd3b7a6ede5e0a99f6c10f6a /modules/pam_unix/bigcrypt.c
parentd071f8c9829cbd60e2a98ab5e6b1ddfdffb9b549 (diff)
parent99d0d1c5c4f07332daa86e73981267a761bc966e (diff)
downloadpam-7561896529a7af05201dc31e959a05897ef99e19.tar.gz
pam-7561896529a7af05201dc31e959a05897ef99e19.tar.bz2
pam-7561896529a7af05201dc31e959a05897ef99e19.zip
Merge 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;
}