constructors raised an exception. backportes from trunk c63403.
- zlib.decompressobj().flush(value) no longer crashes the interpreter when
passed a value less than or equal to zero.
+- issue2858: Fix potential memory corruption when bsddb.db.DBEnv.lock_get
+ and other bsddb.db object constructors raised an exception.
+
Tests
-----
Py_DECREF(self->myenvobj);
self->myenvobj = NULL;
}
- PyObject_Del(self);
+ Py_DECREF(self);
self = NULL;
}
return self;
err = db_env_create(&self->db_env, flags);
MYDB_END_ALLOW_THREADS;
if (makeDBError(err)) {
- PyObject_Del(self);
+ Py_DECREF(self);
self = NULL;
}
else {
#endif
MYDB_END_ALLOW_THREADS;
if (makeDBError(err)) {
- Py_DECREF(self->env);
- PyObject_Del(self);
+ Py_DECREF(self);
self = NULL;
}
return self;
#endif
MYDB_END_ALLOW_THREADS;
if (makeDBError(err)) {
- PyObject_Del(self);
+ Py_DECREF(self);
self = NULL;
}
err = db_sequence_create(&self->sequence, self->mydb->db, flags);
MYDB_END_ALLOW_THREADS;
if (makeDBError(err)) {
- Py_DECREF(self->mydb);
- PyObject_Del(self);
+ Py_DECREF(self);
self = NULL;
}