Skip to content

Commit

Permalink
Issue #1831
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Aug 28, 2020
1 parent b2cffff commit 5719c9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,10 @@ redis_read_xinfo_response(RedisSock *redis_sock, zval *z_ret, int elements)
switch (type) {
case TYPE_BULK:
if ((data = redis_sock_read_bulk_reply(redis_sock, li)) == NULL) {
goto failure;
if (!key) goto failure;
add_assoc_null_ex(z_ret, key, len);
efree(key);
key = NULL;
} else if (key) {
add_assoc_stringl_ex(z_ret, key, len, data, li);
efree(data);
Expand Down

0 comments on commit 5719c9f

Please sign in to comment.