Skip to content

Commit

Permalink
Need to set original PyObject* map to key ordered map. Always DECREF …
Browse files Browse the repository at this point in the history
…original map since it's no longer needed
  • Loading branch information
juliannguyen4 committed Feb 15, 2024
1 parent 4c52c67 commit 6eb28d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/conversions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,11 +1672,12 @@ as_status map_to_pyobject(AerospikeClient *self, as_error *err,
PyObject *key_ordered_dict_class = AerospikeKeyOrderedDict_Get_Type();
PyObject *py_keyordereddict =
PyObject_CallFunctionObjArgs(key_ordered_dict_class, *py_map, NULL);
Py_DECREF(*py_map);
if (py_keyordereddict == NULL) {
Py_DECREF(*py_map);
return as_error_update(err, AEROSPIKE_ERR_CLIENT,
"Failed to create KeyOrderedDict instance.");
}
*py_map = py_keyordereddict;
}

conversion_data convd = {
Expand Down

0 comments on commit 6eb28d5

Please sign in to comment.