Skip to content

Commit

Permalink
Setting a memory error was hiding the real exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekenre committed Dec 7, 2022
1 parent ea1023e commit 70bb8f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/tags.c
Expand Up @@ -143,8 +143,7 @@ static Py_hash_t
CBORTag_hash(CBORTagObject *self)
{
PyObject *tmp = Py_BuildValue("(KO)", self->tag, self->value);
if(!tmp){
PyErr_NoMemory();
if(!tmp){ // if tmp is NULL, Py_BuildValue has already set the error
return -1;
}
Py_hash_t ret = PyObject_Hash(tmp);
Expand Down

0 comments on commit 70bb8f1

Please sign in to comment.