diff options
| author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2014-01-14 17:18:57 -0800 |
|---|---|---|
| committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2014-01-14 17:18:57 -0800 |
| commit | 065e90557c2f2bce6205c5006144bec75638836f (patch) | |
| tree | bcac62c132c39cdf803530164c2c2c1dcbcaae9a /async.c | |
| parent | cc3ee4532533179c589d3f15feb0c76bed96cdb2 (diff) | |
| parent | 070da2162364100c4069a1842b2641ab95b46a1a (diff) | |
| download | hiredict-065e90557c2f2bce6205c5006144bec75638836f.tar.xz | |
Merge pull request #215 from charliesome/fix-bugs
Fix a couple of bugs uncovered by the Clang static analyzer
Diffstat (limited to 'async.c')
| -rw-r--r-- | async.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |
