diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-21 09:58:50 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-21 11:15:43 -0500 |
commit | a93236aa64626bb97a5b8e48306a8525633b9c3b (patch) | |
tree | ac8f014752abfabc4a1888ab1bda5bc7d3d4ee01 /src/test | |
parent | baf327864a052e2fc063eaa83964b9b92edb0d21 (diff) |
test-env-util: fix typo leading to memleak
Partially fixes #5405.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-env-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-env-util.c b/src/test/test-env-util.c index 4f44cf8711..e5cc2a2df8 100644 --- a/src/test/test-env-util.c +++ b/src/test/test-env-util.c @@ -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")); |