summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-conf.c2
-rw-r--r--src/network/networkd.h1
-rw-r--r--src/network/test-networkd-conf.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/network/networkd-conf.c b/src/network/networkd-conf.c
index 6072c1e2de..b67a1f6d09 100644
--- a/src/network/networkd-conf.c
+++ b/src/network/networkd-conf.c
@@ -70,7 +70,7 @@ int config_parse_duid_rawdata(
for (;;) {
int n1, n2, len, r;
uint32_t byte;
- char *cbyte;
+ _cleanup_free_ char *cbyte = NULL;
r = extract_first_word(&rvalue, &cbyte, ":", 0);
if (r < 0) {
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 26d9e7d6e0..ab512f0d08 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -41,7 +41,6 @@
#include "networkd-netdev-tuntap.h"
#include "networkd-netdev-veth.h"
#include "networkd-netdev-vlan.h"
-#include "networkd-netdev-vlan.h"
#include "networkd-netdev-vxlan.h"
#include "networkd-network.h"
#include "networkd-util.h"
diff --git a/src/network/test-networkd-conf.c b/src/network/test-networkd-conf.c
index 8a62a2a567..9bd30b82c6 100644
--- a/src/network/test-networkd-conf.c
+++ b/src/network/test-networkd-conf.c
@@ -47,10 +47,12 @@ static void test_config_parse_duid_type(void) {
static void test_config_parse_duid_rawdata_one(const char *rvalue, int ret, const DUID* expected) {
DUID actual = {};
int r;
+ _cleanup_free_ char *d = NULL;
r = config_parse_duid_rawdata("network", "filename", 1, "section", 1, "lvalue", 0, rvalue, &actual, NULL);
+ d = hexmem(actual.raw_data, actual.raw_data_len);
log_info_errno(r, "\"%s\" → \"%s\" (%m)",
- rvalue, strnull(hexmem(actual.raw_data, actual.raw_data_len)));
+ rvalue, strnull(d));
assert_se(r == ret);
if (expected) {
assert_se(actual.raw_data_len == expected->raw_data_len);