Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
065e9055
Commit
065e9055
authored
Jan 14, 2014
by
Pieter Noordhuis
Browse files
Merge pull request #215 from charliesome/fix-bugs
Fix a couple of bugs uncovered by the Clang static analyzer
parents
cc3ee453
070da216
Changes
2
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
065e9055
...
...
@@ -174,6 +174,11 @@ redisAsyncContext *redisAsyncConnectUnix(const char *path) {
return
NULL
;
ac
=
redisAsyncInitialize
(
c
);
if
(
ac
==
NULL
)
{
redisFree
(
c
);
return
NULL
;
}
__redisAsyncCopyError
(
ac
);
return
ac
;
}
...
...
@@ -398,7 +403,7 @@ void redisProcessCallbacks(redisAsyncContext *ac) {
__redisAsyncDisconnect
(
ac
);
return
;
}
/* If monitor mode, repush callback */
if
(
c
->
flags
&
REDIS_MONITORING
)
{
__redisPushCallback
(
&
ac
->
replies
,
&
cb
);
...
...
sds.c
View file @
065e9055
...
...
@@ -295,7 +295,11 @@ sds *sdssplitlen(char *s, int len, char *sep, int seplen, int *count) {
#ifdef SDS_ABORT_ON_OOM
if
(
tokens
==
NULL
)
sdsOomAbort
();
#endif
if
(
seplen
<
1
||
len
<
0
||
tokens
==
NULL
)
return
NULL
;
if
(
tokens
==
NULL
)
return
NULL
;
if
(
seplen
<
1
||
len
<
0
)
{
free
(
tokens
);
return
NULL
;
}
if
(
len
==
0
)
{
*
count
=
0
;
return
tokens
;
...
...
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