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
b60952f2
Commit
b60952f2
authored
Oct 07, 2010
by
Pieter Noordhuis
Browse files
Disconnect before free'ing
parent
9cd3b03d
Changes
1
Hide whitespace changes
Inline
Side-by-side
hiredis.c
View file @
b60952f2
...
...
@@ -594,6 +594,11 @@ void redisDisconnect(redisContext *c) {
}
void
redisFree
(
redisContext
*
c
)
{
/* Disconnect before free'ing if not yet disconnected. */
if
(
c
->
flags
&
REDIS_CONNECTED
)
redisDisconnect
(
c
);
/* Fire free callback and clear all allocations. */
if
(
c
->
cbFree
!=
NULL
)
c
->
cbFree
(
c
,
c
->
privdataFree
);
if
(
c
->
error
!=
NULL
)
...
...
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