chiark / gitweb /
Always prefer our headers to system headers
[elogind.git] / src / journal / coredumpctl.c
index d1450c09a28df907f772a9866fd58a1ac7dcc6cd..2bc9021022bbfbfba56cd2c16d4accc3d8920de0 100644 (file)
@@ -26,7 +26,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "build.h"
 #include "set.h"
@@ -131,11 +131,10 @@ static int add_match(Set *set, const char *match) {
                 goto fail;
 
         log_debug("Adding pattern: %s", pattern);
-        r = set_put(set, pattern);
+        r = set_consume(set, pattern);
         if (r < 0) {
                 log_error("Failed to add pattern '%s': %s",
                           pattern, strerror(-r));
-                free(pattern);
                 goto fail;
         }