summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2016-05-05 13:22:35 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2016-05-05 13:24:03 +0200
commit3eb83261621dbd398022c8d1f23c7ce68905ee1f (patch)
tree2b800350293de3c67fd218e9c7110cd41fdf98f7 /src
parent2679936e6881625a9a95a451b2e4d51092b8ae38 (diff)
test-networkd-conf: fix memleak
Diffstat (limited to 'src')
-rw-r--r--src/network/test-networkd-conf.c4
1 files changed, 3 insertions, 1 deletions
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);