avoid possible null pointer deref (coverity)
authorChristos Zoulas <christos@zoulas.com>
Wed, 17 Sep 2008 20:07:20 +0000 (20:07 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 17 Sep 2008 20:07:20 +0000 (20:07 +0000)
amd/amfs_generic.c

index 8e86e55f4cb0dce29dfa38646a6191b0aa4f52b4..3788e473e5fc80a0946e1c0386bcf1271800f8d3 100644 (file)
@@ -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)