/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
/**
* We also use the request-freelist to store encoding buffers, rather than
* freeing and xmalloc'ing them on each cycle.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
void request_release(request *r)
{
request_q *q = r->q;
+ if (r->request_mem)
+ nmem_destroy(r->request_mem);
r->next = q->list;
q->list = r;
}