summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nunberg <mnunberg@haskalah.org>2019-02-11 14:55:07 -0500
committerMark Nunberg <mnunberg@haskalah.org>2019-02-20 09:11:10 -0500
commit1eb44cf0c4e004dda6d8b9c7500cd55e367cc87b (patch)
treea131531c23f8f95dfdb46fc02635a16d8b0dd539
parentf60c5506feab92f2b6185661cce16a303d28a6a3 (diff)
scrub redisContext before freeing
This helps us detect use-after-free
-rw-r--r--hiredis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hiredis.c b/hiredis.c
index 9c2788a..d28fcb9 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -618,6 +618,7 @@ void redisFree(redisContext *c) {
if (c->ssl) {
redisFreeSsl(c->ssl);
}
+ memset(0xff, c, sizeof(*c));
free(c);
}