chiark / gitweb /
a couple of missing pcre -> gc bindings
[disorder] / clients / disorder.c
index d2e35126b7df673617d097b2fab6cdbd93e1677b..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"
@@ -502,6 +503,9 @@ int main(int argc, char **argv) {
   struct vector args;
 
   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) {