Author: pfg
Date: Tue Jan 27 20:48:05 2015
New Revision: 277814
URL: https://svnweb.freebsd.org/changeset/base/277814

Log:
  amd: Add extra check for NULL before deref.
  
  CID:          274421
  Obtained from:        NetBSD
  MFC after:    5 days

Modified:
  head/contrib/amd/amd/amfs_generic.c

Modified: head/contrib/amd/amd/amfs_generic.c
==============================================================================
--- head/contrib/amd/amd/amfs_generic.c Tue Jan 27 20:00:55 2015        
(r277813)
+++ head/contrib/amd/amd/amfs_generic.c Tue Jan 27 20:48:05 2015        
(r277814)
@@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp
     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)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to