summaryrefslogtreecommitdiff
path: root/modules/pam_motd
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-04-26 11:12:59 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-04-26 11:12:59 +0000
commit4efb14c2ae1c2cf8c0aba4f626a0942295017f40 (patch)
tree66ab9b4b682cc5307c25ce822c3f8207f2f007e4 /modules/pam_motd
parent3edc51e9e1151a54172ec0a7c9660a7d7b1a6b49 (diff)
pam_motd: do not zero the memory allocated by calloc
As dirnames_all is allocated with calloc, zeroing it out is pointless. * modules/pam_motd/pam_motd.c (try_to_display_directories_with_overrides): Remove redundant zeroing of dirnames_all. Fixes: f9c9c721 ("pam_motd: Support multiple motd paths specified, with filename overrides (#69)")
Diffstat (limited to 'modules/pam_motd')
-rw-r--r--modules/pam_motd/pam_motd.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c
index d1a4d436..3870d997 100644
--- a/modules/pam_motd/pam_motd.c
+++ b/modules/pam_motd/pam_motd.c
@@ -230,10 +230,6 @@ static void try_to_display_directories_with_overrides(pam_handle_t *pamh,
goto out;
}
- for (i = 0; i < dirscans_size_total; i++) {
- dirnames_all[i] = NULL;
- }
-
for (i = 0; i < num_motd_dirs; i++) {
unsigned int j;