X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=blobdiff_plain;f=src%2Fbasic%2Freplace-var.c;h=0d21423a9c67aced489c89ff60e6abaa77f0416a;hp=478fc43a38858ac34ff38b6564a4e49e04edd71a;hb=6b430fdb7c0c2c52ea69a7d56f23d739218b13d0;hpb=c067b4acef6715050a9fe92d5e16293d06ec69ee
diff --git a/src/basic/replace-var.c b/src/basic/replace-var.c
index 478fc43a388..0d21423a9c6 100644
--- a/src/basic/replace-var.c
+++ b/src/basic/replace-var.c
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
@@ -19,12 +17,15 @@
along with systemd; If not, see .
***/
+#include
+#include
+#include
#include
+#include "alloc-util.h"
#include "macro.h"
-#include "util.h"
#include "replace-var.h"
-#include "def.h"
+#include "string-util.h"
/*
* Generic infrastructure for replacing @FOO@ style variables in
@@ -106,6 +107,5 @@ char *replace_var(const char *text, char *(*lookup)(const char *variable, void*u
return r;
oom:
- free(r);
- return NULL;
+ return mfree(r);
}