svn commit: r305013 - head/cddl/usr.sbin/zfsd

Dimitry Andric dim at FreeBSD.org
Mon Aug 29 18:51:50 UTC 2016


Author: dim
Date: Mon Aug 29 18:51:49 2016
New Revision: 305013
URL: https://svnweb.freebsd.org/changeset/base/305013

Log:
  Add an empty virtual destructor to zfsd's Vdev class.  This is needed
  because the class has virtual functions, and the compiler-generated
  default destructor is non-virtual.
  
  Reviewed by:	asomers
  MFC after:	3 days

Modified:
  head/cddl/usr.sbin/zfsd/vdev.h

Modified: head/cddl/usr.sbin/zfsd/vdev.h
==============================================================================
--- head/cddl/usr.sbin/zfsd/vdev.h	Mon Aug 29 18:47:51 2016	(r305012)
+++ head/cddl/usr.sbin/zfsd/vdev.h	Mon Aug 29 18:51:49 2016	(r305013)
@@ -108,6 +108,12 @@ public:
 	 * \brief No-op copy constructor for nonexistent vdevs.
 	 */
 	Vdev();
+
+	/**
+	 * \brief No-op virtual destructor, since this class has virtual
+	 *        functions.
+	 */
+	virtual ~Vdev();
 	bool			DoesNotExist()	const;
 
 	/**
@@ -145,6 +151,10 @@ private:
 extern Vdev NonexistentVdev;
 
 //- Vdev Inline Public Methods ------------------------------------------------
+inline Vdev::~Vdev()
+{
+}
+
 inline DevdCtl::Guid
 Vdev::PoolGUID() const
 {


More information about the svn-src-head mailing list