diff options
author | pfg <pfg@FreeBSD.org> | 2015-01-29 01:28:39 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-01-29 01:28:39 +0000 |
commit | 9608c0caa102cc9adf5fccb20be5c26a8911b654 (patch) | |
tree | cf71fcbde358d8345475773b6d3ed5b6aaa6b3fa /contrib | |
parent | 6789315d88b34942ecea8cded3957162a0062a57 (diff) | |
download | FreeBSD-src-9608c0caa102cc9adf5fccb20be5c26a8911b654.zip FreeBSD-src-9608c0caa102cc9adf5fccb20be5c26a8911b654.tar.gz |
MFV r277866
amd: Add extra check for NULL before deref.
CID: 274421
Obtained from: NetBSD
MFC after: 4 days
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/amd/amd/amfs_generic.c | 2 |
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) |