diff options
author | davidn <davidn@FreeBSD.org> | 2001-07-20 06:46:48 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 2001-07-20 06:46:48 +0000 |
commit | 011fe38c96c54d1f4837053f0d08af5d79954742 (patch) | |
tree | 6226f136e00f60fc8b19215c5038d6e4d94d7b6f | |
parent | 9c97c8f02d579c6988b1d150fd1c0fa8dacf2e87 (diff) | |
download | FreeBSD-src-011fe38c96c54d1f4837053f0d08af5d79954742.zip FreeBSD-src-011fe38c96c54d1f4837053f0d08af5d79954742.tar.gz |
Fix a possible NULL reference that would be triggered
by invalid input in /etc/crontab.
MFC after: 2 days
-rw-r--r-- | usr.sbin/cron/lib/env.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/cron/lib/env.c b/usr.sbin/cron/lib/env.c index 71e0398..1703735 100644 --- a/usr.sbin/cron/lib/env.c +++ b/usr.sbin/cron/lib/env.c @@ -41,7 +41,8 @@ env_free(envp) { char **p; - for (p = envp; *p; p++) + if ((p = envp)) + for (; *p; p++) free(*p); free(envp); } |