Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
3c023ee1
Commit
3c023ee1
authored
Jan 22, 2015
by
Matt Stancliff
Browse files
Cleanup memory during test
parent
195aca34
Changes
1
Show whitespace changes
Inline
Side-by-side
test.c
View file @
3c023ee1
...
@@ -107,6 +107,7 @@ static redisContext *connect(struct config config) {
...
@@ -107,6 +107,7 @@ static redisContext *connect(struct config config) {
exit
(
1
);
exit
(
1
);
}
else
if
(
c
->
err
)
{
}
else
if
(
c
->
err
)
{
printf
(
"Connection error: %s
\n
"
,
c
->
errstr
);
printf
(
"Connection error: %s
\n
"
,
c
->
errstr
);
redisFree
(
c
);
exit
(
1
);
exit
(
1
);
}
}
...
@@ -497,6 +498,7 @@ static void test_invalid_timeout_errors(struct config config) {
...
@@ -497,6 +498,7 @@ static void test_invalid_timeout_errors(struct config config) {
c
=
redisConnectWithTimeout
(
config
.
tcp
.
host
,
config
.
tcp
.
port
,
config
.
tcp
.
timeout
);
c
=
redisConnectWithTimeout
(
config
.
tcp
.
host
,
config
.
tcp
.
port
,
config
.
tcp
.
timeout
);
test_cond
(
c
->
err
==
REDIS_ERR_IO
);
test_cond
(
c
->
err
==
REDIS_ERR_IO
);
redisFree
(
c
);
test
(
"Set error when an invalid timeout sec value is given to redisConnectWithTimeout: "
);
test
(
"Set error when an invalid timeout sec value is given to redisConnectWithTimeout: "
);
...
@@ -506,7 +508,6 @@ static void test_invalid_timeout_errors(struct config config) {
...
@@ -506,7 +508,6 @@ static void test_invalid_timeout_errors(struct config config) {
c
=
redisConnectWithTimeout
(
config
.
tcp
.
host
,
config
.
tcp
.
port
,
config
.
tcp
.
timeout
);
c
=
redisConnectWithTimeout
(
config
.
tcp
.
host
,
config
.
tcp
.
port
,
config
.
tcp
.
timeout
);
test_cond
(
c
->
err
==
REDIS_ERR_IO
);
test_cond
(
c
->
err
==
REDIS_ERR_IO
);
redisFree
(
c
);
redisFree
(
c
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment