- markus@cvs.openbsd.org 2003/09/18 07:54:48
     [buffer.c]
     protect against double free; #660;  zardoz at users.sf.net
diff --git a/buffer.c b/buffer.c
index aee293f..a80880b 100644
--- a/buffer.c
+++ b/buffer.c
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: buffer.c,v 1.18 2003/09/16 21:02:39 markus Exp $");
+RCSID("$OpenBSD: buffer.c,v 1.19 2003/09/18 07:54:48 markus Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
@@ -39,6 +39,7 @@
 {
 	if (buffer->alloc > 0) {
 		memset(buffer->buf, 0, buffer->alloc);
+		buffer->alloc = 0;
 		xfree(buffer->buf);
 	}
 }