PERFORCE change 128600 for review

Kip Macy kmacy at FreeBSD.org
Sat Nov 3 17:14:40 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=128600

Change 128600 by kmacy at kmacy:storage:toestack on 2007/11/04 00:13:55

	free toepcb when the refcount goes to zero

Affected files ...

.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.c#4 edit

Differences ...

==== //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.c#4 (text+ko) ====

@@ -130,6 +130,14 @@
 void
 toepcb_release(struct toepcb *toep)
 {
+	if (toep->tp_refcount == 1) {
+		/*
+		 * XXX clear our reference on the inpcb
+		 */
+		free(toep, M_DEVBUF);
+		return;
+	}
+	
 	atomic_add_acq_int(&toep->tp_refcount, -1);
 }
 


More information about the p4-projects mailing list