PYTHON-870 - Fix two unlikely reference leaks.

This commit is contained in:
Bernie Hackett 2015-03-26 11:46:33 -07:00
parent e88764d9e0
commit 76530ccd72

View File

@ -385,6 +385,7 @@ static int _load_python_objects(PyObject* module) {
if (_load_object(&re_compile, "re", "compile")) {
state->REType = NULL;
Py_DECREF(empty_string);
return 1;
}
@ -2129,6 +2130,7 @@ static PyObject* get_value(PyObject* self, const char* buffer,
if (!bson_int64_type)
goto invalid;
if (max < 8) {
Py_DECREF(bson_int64_type);
goto invalid;
}
memcpy(&ll, buffer + *position, 8);