From d414de481f6efe52455c19f64e911d0db34d185a Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 17 Sep 2008 20:07:20 +0000 Subject: [PATCH] avoid possible null pointer deref (coverity) --- amd/amfs_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c index 8e86e55f..3788e473 100644 --- a/amd/amfs_generic.c +++ b/amd/amfs_generic.c @@ -1103,7 +1103,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) -- 2.43.0