Skip to content

Commit

Permalink
fix reply map value memory leak
Browse files Browse the repository at this point in the history
Signed-off-by: siavash119 <[email protected]>
  • Loading branch information
siavash119 authored Oct 31, 2024
1 parent a85254f commit 06ccd5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ static void *tryParentize(const valkeyReadTask *task, PyObject *obj) {
Py_DECREF(obj);
return NULL;
}
if (PyDict_SetItem(parent, self->pendingObject, obj) < 0) {
Py_DECREF(obj);
Py_DECREF(self->pendingObject);
self->pendingObject = NULL;
int x = PyDict_SetItem(parent, self->pendingObject, obj);
Py_DECREF(obj);
Py_DECREF(self->pendingObject);
self->pendingObject = NULL;
if (x < 0) {
return NULL;
}
self->pendingObject = NULL;
}
break;
case VALKEY_REPLY_SET:
Expand Down

0 comments on commit 06ccd5b

Please sign in to comment.