Commit 89d8c3e3 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(aux_item_definition_cache_regexp): Call regfree() when a regex

	compilation fail, since our re_compile_pattern may leave
	allocated stuff in the buffer.
parent 2a57bad0
* $Id: aux-items.c,v 1.42 2002/08/02 00:27:12 ceder Exp $
* $Id: aux-items.c,v 1.43 2002/08/02 13:10:58 ceder Exp $
* Copyright (C) 1994-2001 Lysator Academic Computer Association.
* This file is part of the LysKOM server.
......@@ -445,14 +445,9 @@ aux_item_definition_cache_regexp(const Aux_item_definition *def,
if (def->validators[ix]
#if 0
/* FIXME (bug 687): Do we need to regfree() the compiled
regexp here? Are we *allowed* to regfree() it? For
now, I'd rather have a small memory leak than a double
free() bug, so don't free it without checking what
re_compile_pattern actually does. */
/* If re_compile_pattern fails, it can leave allocated
stuff in the buffer. */
if (def->validators[ix]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment