Browse code

fix write() on a file desriptor of -1, bb#5784

Steve Morgan authored on 2012/09/18 04:36:17
Showing 1 changed files
... ...
@@ -639,6 +639,7 @@ static int handle_stream(client_conn_t *conn, struct fd_buf *buf, const struct o
639 639
 			pthread_mutex_unlock(&exit_mutex);
640 640
 		    }
641 641
 		    *error = 1;
642
+		    return -1;
642 643
 		} else {
643 644
 		    pos = 4;
644 645
 		    memmove (buf->buffer, &buf->buffer[pos], buf->off - pos);