Skip to content

Commit

Permalink
Fix object leak during connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkleehammer committed Mar 30, 2017
1 parent da53201 commit 722c74b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cnxninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ static PyObject* GetHash(PyObject* p)
if (!hash.IsValid())
return 0;

PyObject_CallMethodObjArgs(hash, update, p, 0);
Object result(PyObject_CallMethodObjArgs(hash, update, p, 0));
if (!result.IsValid())
return 0;

return PyObject_CallMethod(hash, "hexdigest", 0);
}

Expand Down

0 comments on commit 722c74b

Please sign in to comment.