29 Commits

Author SHA1 Message Date
antirez
081a0c943f Fix Sentinel memory leak (hiredis bug)
This fixes issue #2535, that was actually an hiredis library bug (I
submitted an issue and fix to the redis/hiredis repo as well).

When an asynchronous hiredis connection subscribes to a Pub/Sub channel
and gets an error, and in other related conditions, the function
redisProcessCallbacks() enters a code path where the link is
disconnected, however the function returns before freeing the allocated
reply object. This causes a memory leak. The memory leak was trivial to
trigger in Redis Sentinel, which uses hiredis, every time we tried to
subscribe to an instance that required a password, in case the Sentinel
was configured either with the wrong password or without password at
all. In this case, the -AUTH error caused the leaking code path to be
executed.

It was verified with Valgrind that after this change the leak no longer
happens in Sentinel with a misconfigured authentication password.
2015-04-28 22:15:12 +02:00
Aaron Rutkovsky
3101760937 Fix typos
Closes #1513
2014-10-06 09:59:02 +02:00
Matt Stancliff
cf143b571e Fix hiredis getaddrinfo leak
Fixed in Redis by 1a5e5b6, but since that part of code
is largely copy/paste from Redis, the fix needs to be
ported over too.

Closes #2012
2014-09-19 14:21:36 +02:00
antirez
97fdcd8746 Missing va_end also added in hiredis copy of sds.c. 2014-08-27 10:31:41 +02:00
Mariano Pérez Rodríguez
45fac9481a Missing assert removal from sdsIncrLen()
Companion for 8eeb1802ec42682a614a5ebca318a0ba44ca7c03, but dealing with hiredis.
2014-08-27 10:31:35 +02:00
antirez
134345e332 Use unsigned integers in SDS header.
This raises the max string to 4GB without any downside.
2014-08-27 10:25:54 +02:00
siahl
b5dc2c5b91 Add support for compiling on AIX
Closes #1900
2014-08-27 10:22:28 +02:00
antirez
95f492ee57 Silence different signs comparison warning in sds.c. 2014-06-23 11:53:50 +02:00
antirez
364464e790 Use Redis updated sds.c for deps/hiredis. 2014-06-23 11:53:45 +02:00
antirez
a8ecd3f040 Dummy zmalloc.h restored into deps/hiredis. 2014-06-23 11:53:15 +02:00
Matt Stancliff
6ee25dc439 hiredis: Update to latest version
This is hiredis f225c276be7fd0646019b51023e3f41566633dfe

This update includes all changes that diverged inside of Redis since
the last update.  This version also allows optional source address
binding for connections which we need for some Sentinel deployments.
2014-06-23 11:53:12 +02:00
antirez
0e72cc601f Fix sdsempty() prototype in sds.h. 2013-08-12 11:38:28 +02:00
antirez
aea8020554 Use latest sds.c in the hiredis library under deps. 2013-07-25 10:34:02 +02:00
antirez
4cfd70e903 hiredis: minimal IPv6 support. 2013-07-11 17:09:35 +02:00
antirez
6fa2610ac9 Added missing license and copyright in deps/hiredis. 2012-12-17 11:11:36 +01:00
Patrick TJ McPhee
5207c03c49 Define _XOPEN_SOURCE appropriately on NetBSD. 2012-12-12 18:42:41 +01:00
antirez
7fcba9fd9a hiredis library updated.
This version of hiredis merges modifications of the Redis fork with
latest changes in the hiredis repository.

The same version was pushed on the hiredis repository and will probably
merged into the master branch in short time.
2012-08-22 11:33:57 +02:00
antirez
ad0df18fdc Fix 32bit build of hiredis 2012-02-19 20:49:20 +01:00
antirez
8e65b6a33d Applied a few modifications to hiredis to tune it for speed (redis-benchmark) and ability to read more deeply nested replies (redis-cli). 2012-02-19 20:33:59 +01:00
antirez
b66e5add82 The hiredis lib shipped with Redis was updated to latest version. 2012-02-19 20:26:50 +01:00
antirez
65330badb9 hiredis/redis changes for speed with big payloads: read buffer size set
to 16k, request buffer size is no longer destroyed when emtpy and large
(better fix needed). Redis clients static output buffer set to 16k as
well.
2011-11-08 10:59:59 +01:00
antirez
63d62eb786 hiredis max multi bulk nesting level raised to 7 2011-06-30 13:34:38 +02:00
Pieter Noordhuis
9703b1b3dc Update hiredis 2011-05-05 16:25:48 +02:00
Pieter Noordhuis
a1e97d692e Update hiredis to 0.9.2 2010-12-23 11:01:11 +00:00
antirez
d8d528e992 quick and dirty fix for hiredis bug creating problem with the new redis-cli connect commmand. Also change prompt when redis-cli is not connected 2010-11-29 12:20:17 +01:00
Pieter Noordhuis
a4e48b417d Don't hardcode make to "make" 2010-11-21 16:44:17 +01:00
Pieter Noordhuis
57c9babd81 Update hiredis 2010-11-05 17:24:48 +01:00
Pieter Noordhuis
afc156c2d8 Update hiredis 2010-11-04 13:35:47 +01:00
Pieter Noordhuis
24f753a8b9 Add hiredis dependency for redis-cli, redis-benchmark, etc 2010-11-03 16:03:04 +01:00