1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-12 09:17:44 +03:00

test-env-util: fix typo leading to memleak

Partially fixes #5405.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-02-21 09:58:50 -05:00
parent baf327864a
commit a93236aa64

View File

@ -160,8 +160,8 @@ static void test_replace_env(bool braceless) {
q = replace_env("BARBAR=$BARBAR=${BARBAR}", (char**) env, flags);
assert_se(streq(q, braceless ? "BARBAR==" : "BARBAR=$BARBAR="));
q = replace_env("BAR=$BAR$BAR${BAR}${BAR}", (char**) env, flags);
assert_se(streq(q, braceless ? "BAR=waldowaldowaldowaldo" : "BAR=$BAR$BARwaldowaldo"));
r = replace_env("BAR=$BAR$BAR${BAR}${BAR}", (char**) env, flags);
assert_se(streq(r, braceless ? "BAR=waldowaldowaldowaldo" : "BAR=$BAR$BARwaldowaldo"));
p = replace_env("${BAR}$BAR$BAR", (char**) env, flags);
assert_se(streq(p, braceless ? "waldowaldowaldo" : "waldo$BAR$BAR"));