Commit e1abacb7 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Return when memory cannot be allocated

parent 026636b0
......@@ -528,7 +528,12 @@ static int processItem(redisReader *r) {
}
redisReader *redisReplyReaderCreate(void) {
redisReader *r = calloc(sizeof(redisReader),1);
redisReader *r;
r = calloc(sizeof(redisReader),1);
if (r == NULL)
return NULL;
r->err = 0;
r->errstr[0] = '\0';
r->fn = &defaultFunctions;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment