--- fcgi.c.orig 2003-09-23 11:20:01.000000000 -0700 +++ fcgi.c 2003-09-23 11:20:29.000000000 -0700 @@ -389,9 +389,11 @@ static VALUE fcgi_stream_read(int argc, if (n > 0) { rb_str_cat(str, buff, n); } else { + xfree(buff); return Qnil; } } + xfree(buff); return str; } @@ -404,9 +406,11 @@ static VALUE fcgi_stream_read(int argc, if (n > 0) { str = rb_str_new(buff, n); OBJ_TAINT(str); + xfree(buff); return str; } else { + xfree(buff); return Qnil; } }