summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-02-03 14:36:48 +0000
committerpfg <pfg@FreeBSD.org>2015-02-03 14:36:48 +0000
commitc215a1c7d8b2d4344beb5e999ffd886e5244a305 (patch)
tree083a111aa1bb9e95bba1127c03b073309d47c549 /contrib
parent5e5b664385bb81f5067727b8490905d696ed8549 (diff)
downloadFreeBSD-src-c215a1c7d8b2d4344beb5e999ffd886e5244a305.zip
FreeBSD-src-c215a1c7d8b2d4344beb5e999ffd886e5244a305.tar.gz
MFV r277814, r277868, r277869:
amd: Add extra check for NULL before deref. MFV r277841: Fix a clang 3.6.0 warning (from dim) CID: 274421 Obtained from: NetBSD MFC after: 4 days
Diffstat (limited to 'contrib')
-rw-r--r--contrib/amd/amd/amfs_generic.c2
-rw-r--r--contrib/amd/hlfsd/homedir.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/amd/amd/amfs_generic.c b/contrib/amd/amd/amfs_generic.c
index 3e7c365..0d59969 100644
--- a/contrib/amd/amd/amfs_generic.c
+++ b/contrib/amd/amd/amfs_generic.c
@@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return)
new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT));
*(new_mp->am_transp) = *current_transp;
}
- if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops))
+ if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops))
new_mp->am_error = error;
if (new_mp->am_error > 0)
diff --git a/contrib/amd/hlfsd/homedir.c b/contrib/amd/hlfsd/homedir.c
index 2ade32f..fb4720c 100644
--- a/contrib/amd/hlfsd/homedir.c
+++ b/contrib/amd/hlfsd/homedir.c
@@ -494,7 +494,7 @@ readent:
buf[0] = '\0';
fgets(buf, 256, passwd_fp);
passwd_line++;
- if (!buf || buf[0] == '\0')
+ if (buf[0] == '\0')
goto readent;
/* read user name */
OpenPOWER on IntegriCloud