common/iobuf.c: Fix filter type for iobuf_temp_with_content.
authorNeal H. Walfield <neal@g10code.com>
Wed, 12 Aug 2015 10:03:23 +0000 (12:03 +0200)
committerNeal H. Walfield <neal@g10code.com>
Thu, 20 Aug 2015 12:16:18 +0000 (14:16 +0200)
* common/iobuf.c (iobuf_temp_with_content): Set the filter type to
IOBUF_INPUT, not IOBUF_TEMP, which is only for output filters that
write into a dynamic buffer.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
common/iobuf.c

index fb9a620..23d14e6 100644 (file)
@@ -1234,7 +1234,7 @@ iobuf_temp_with_content (const char *buffer, size_t length)
   iobuf_t a;
   int i;
 
-  a = iobuf_alloc (IOBUF_TEMP, length);
+  a = iobuf_alloc (IOBUF_INPUT, length);
   /* memcpy (a->d.buf, buffer, length); */
   for (i=0; i < length; i++)
     a->d.buf[i] = buffer[i];