]> git.droids-corp.org - protos/libecoli.git/blobdiff - lib/ecoli_strvec.c
use helper in cmd node
[protos/libecoli.git] / lib / ecoli_strvec.c
index d8f4a86bc4183b230c6372221993edaab760f394..c574b1b63764ea5e79a40198905e3cd17ba484b0 100644 (file)
@@ -373,6 +373,7 @@ static int ec_strvec_testcase(void)
        testres |= EC_TEST_CHECK(ec_strvec_cmp(strvec, strvec2) == 0,
                "strvec and strvec2 should be equal\n");
        ec_strvec_free(strvec2);
+       strvec2 = NULL;
 
        f = open_memstream(&buf, &buflen);
        if (f == NULL)
@@ -400,8 +401,10 @@ static int ec_strvec_testcase(void)
        }
        testres |= EC_TEST_CHECK(ec_strvec_cmp(strvec, strvec2) == 0,
                "strvec and strvec2 should be equal\n");
-       ec_strvec_free(strvec2);
        ec_strvec_free(strvec);
+       strvec = NULL;
+       ec_strvec_free(strvec2);
+       strvec2 = NULL;
 
        return testres;