summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-10-13 12:16:34 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-10-13 12:16:34 +0000
commitbe24b6a4f516323053efc9a390a22d7fc7fc3194 (patch)
tree74c01426a56e26229a03b3d924aab9950bbc13ff /lib
parent1ce66fa2b1a53efaf2045d07c94f2bab4d56ce6b (diff)
In evbuffer_readline, do not lose data upon malloc failure. From mainstream:
http://levent.svn.sourceforge.net/viewvc/levent?view=rev&revision=1436 ok gilles@
Diffstat (limited to 'lib')
-rw-r--r--lib/libevent/buffer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libevent/buffer.c b/lib/libevent/buffer.c
index 264e6df0915..0f531f979ea 100644
--- a/lib/libevent/buffer.c
+++ b/lib/libevent/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.15 2008/05/02 06:09:11 brad Exp $ */
+/* $OpenBSD: buffer.c,v 1.16 2009/10/13 12:16:33 jacekm Exp $ */
/*
* Copyright (c) 2002, 2003 Niels Provos <provos@citi.umich.edu>
@@ -225,7 +225,6 @@ evbuffer_readline(struct evbuffer *buffer)
if ((line = malloc(i + 1)) == NULL) {
fprintf(stderr, "%s: out of memory\n", __func__);
- evbuffer_drain(buffer, i);
return (NULL);
}