lkml.org 
[lkml]   [1996]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectsmall bug in pipe.c
Date

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

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.023 / U:1.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site