From: Christos Zoulas Date: Wed, 17 Sep 2008 20:07:20 +0000 (+0000) Subject: avoid possible null pointer deref (coverity) X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=d414de481f6efe52455c19f64e911d0db34d185a;p=am-utils-6.0.git avoid possible null pointer deref (coverity) --- diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c index 8e86e55..3788e47 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)