small bug in pipe.c

Jochen Hoenicke (Jochen.Hoenicke@arbi.informatik.uni-oldenburg.de)
Tue, 23 Apr 1996 13:03:11 +0200 (MET DST)


Hello,

I've found a small bug in pipe.c:

A pipe-inode has a i_count of two, so it must be freed twice in do_pipe
if an error occurs.

Jochen

--snip-----------------------------------------
--- pipe.c~ Thu Apr 11 11:25:30 1996
+++ pipe.c Mon Apr 22 21:16:00 1996
@@ -423,6 +423,7 @@
break;
if (j < 2) {
iput(inode);
+ iput(inode);
if (j)
f[0]->f_count--;
return -ENFILE;
@@ -434,6 +435,7 @@
j++;
}
if (j<2) {
+ iput(inode);
iput(inode);
f[0]->f_count--;
f[1]->f_count--;
--snip-----------------------------------------

--
email: delwi@uni-oldenburg.de