summaryrefslogtreecommitdiffstats
path: root/contrib/amd
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-01-27 20:48:05 +0000
committerpfg <pfg@FreeBSD.org>2015-01-27 20:48:05 +0000
commit1d356945ea409b072d67d33c8ddad0e78e4619a1 (patch)
tree0cde4f9c474bef51c74ab00382760e398989582c /contrib/amd
parentb7d476d8d9dc6c9f6fc4e8c2552562fe1aaf8fd2 (diff)
downloadFreeBSD-src-1d356945ea409b072d67d33c8ddad0e78e4619a1.zip
FreeBSD-src-1d356945ea409b072d67d33c8ddad0e78e4619a1.tar.gz
amd: Add extra check for NULL before deref.
CID: 274421 Obtained from: NetBSD MFC after: 5 days
Diffstat (limited to 'contrib/amd')
-rw-r--r--contrib/amd/amd/amfs_generic.c2
1 files changed, 1 insertions, 1 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)
OpenPOWER on IntegriCloud