summaryrefslogtreecommitdiff
path: root/modules/pam_umask/pam_umask.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-09-19 09:33:00 +0000
committer <>2014-11-13 09:36:22 +0000
commitb1521c97e73b10469f7b34c0571d51c647eca83c (patch)
tree212a6a00baa11e9d0ca7bc27b12420d1dce6f07c /modules/pam_umask/pam_umask.c
parent6e36ca00ed774a7c5b2f2322c96b023999b733a4 (diff)
downloadlinux-pam-b1521c97e73b10469f7b34c0571d51c647eca83c.tar.gz
Imported from /home/lorry/working-area/delta_linux-pam/Linux-PAM-1.1.8.tar.bz2.HEADLinux-PAM-1.1.8master
Diffstat (limited to 'modules/pam_umask/pam_umask.c')
-rw-r--r--modules/pam_umask/pam_umask.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/pam_umask/pam_umask.c b/modules/pam_umask/pam_umask.c
index 6d2ec1a..863f038 100644
--- a/modules/pam_umask/pam_umask.c
+++ b/modules/pam_umask/pam_umask.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, 2007, 2010 Thorsten Kukuk <kukuk@thkukuk.de>
+ * Copyright (c) 2005, 2006, 2007, 2010, 2013 Thorsten Kukuk <kukuk@thkukuk.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -112,6 +112,10 @@ search_key (const char *filename)
{
buflen = BUF_SIZE;
buf = malloc (buflen);
+ if (buf == NULL) {
+ fclose (fp);
+ return NULL;
+ }
}
buf[0] = '\0';
if (fgets (buf, buflen - 1, fp) == NULL)