Skip to content

Commit

Permalink
Fix valgrind test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed May 5, 2021
1 parent 3af1513 commit 625068a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,11 @@ static void test_async(struct config config) {
while(astest.connected == 0)
redisPollTick(c, 0.1);
assert(astest.connected == -1);
redisAsyncFree(c);
/*
* freeing should not be done, clearing should have happened.
*redisAsyncFree(c);
*/
assert(astest.ac == NULL);
test_cond(astest.connect_status == REDIS_ERR);
} else
test_skipped();
Expand All @@ -1586,7 +1590,7 @@ static void test_async(struct config config) {
while(astest.connected == 0)
redisPollTick(c, 0.1);
assert(astest.connected == -1);
redisAsyncFree(c);
assert(astest.ac == NULL);
test_cond(astest.connect_status == REDIS_ERR);
} else
test_skipped();
Expand Down

0 comments on commit 625068a

Please sign in to comment.