chiark / gitweb /
sort of works
[disorder] / clients / disorder.c
index 46e2c2d11db914b3f5efe83f4b22a8f4ef7c2a8b..0ce20aa271ba5ec53a27a5e76cda4ebd28a7715d 100644 (file)
@@ -34,6 +34,7 @@
 #include <stddef.h>
 #include <unistd.h>
 #include <assert.h>
+#include <pcre.h>
 
 #include "configuration.h"
 #include "syscalls.h"
@@ -501,7 +502,10 @@ int main(int argc, char **argv) {
   int status = 0;
   struct vector args;
 
-  mem_init(1);
+  mem_init();
+  /* garbage-collect PCRE's memory */
+  pcre_malloc = xmalloc;
+  pcre_free = xfree;
   if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
   while((n = getopt_long(argc, argv, "hVc:dHL", options, 0)) >= 0) {
     switch(n) {
@@ -551,4 +555,3 @@ c-basic-offset:2
 comment-column:40
 End:
 */
-/* arch-tag:0ff200f4c42e9b04dd781fa89c6129f6 */