Index: regex.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/regex.c,v
retrieving revision 1.13
diff -u -r1.13 regex.c
--- regex.c	12 Jan 2009 16:46:53 -0000	1.13
+++ regex.c	27 Jun 2009 09:33:37 -0000
@@ -107,6 +107,7 @@
         error(0, "%s:%ld: %s: regex compilation `%s' failed: %s (Called from %s:%ld:%s.)",
               __FILE__, (long) __LINE__, __func__, octstr_get_cstr(pattern), buffer, 
               (file), (long) (line), (func));
+        gw_free(preg);
         return NULL;
     }
 
