set the refcount for the structure (dropped by mistake in the last commit).

This commit is contained in:
Luigi Rizzo 2015-07-13 10:23:52 +00:00
parent 29513c141f
commit 5f94000ee4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285445

View file

@ -638,6 +638,7 @@ netmap_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
M_NOWAIT | M_ZERO);
if (priv == NULL)
return ENOMEM;
priv->np_refs = 1;
error = devfs_set_cdevpriv(priv, netmap_dtor);
if (error) {
free(priv, M_DEVBUF);