Fix pipeclose()'s wild write
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 24 Jul 2015 22:54:35 +0000 (18:54 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 28 Jul 2015 23:57:18 +0000 (19:57 -0400)
commit098465df597ad59fc831bb60fb53533c9e8b3313
tree42081aef184e0c29b44caf51dac7e7756faad2db
parent1364445e6b90cbb7e673c1c93767bcb713b9b89f
Fix pipeclose()'s wild write

The qunlock after decref is broken, since it uses the pointer after
freeing the memory.  It'd pop up as a wild write, where suddenly we're
writing a 0 somewhere.

It's also just weird to unlock in the release method.
kern/drivers/dev/pipe.c