Commit 4868ef88 authored by Neal Norwitz's avatar Neal Norwitz

Whoops, need to pay attention to those test failures.

Move the clear to *before* the first use, not after.
parent 59f58aae
...@@ -1724,6 +1724,7 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs) ...@@ -1724,6 +1724,7 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs)
CHECK_DB_NOT_CLOSED(self); CHECK_DB_NOT_CLOSED(self);
if (!make_key_dbt(self, keyobj, &key, NULL)) if (!make_key_dbt(self, keyobj, &key, NULL))
return NULL; return NULL;
CLEAR_DBT(data);
if ( !make_dbt(dataobj, &data) || if ( !make_dbt(dataobj, &data) ||
!checkTxnObj(txnobj, &txn) ) !checkTxnObj(txnobj, &txn) )
{ {
...@@ -1731,7 +1732,6 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs) ...@@ -1731,7 +1732,6 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs)
return NULL; return NULL;
} }
CLEAR_DBT(data);
flags |= DB_GET_BOTH; flags |= DB_GET_BOTH;
if (CHECK_DBFLAG(self, DB_THREAD)) { if (CHECK_DBFLAG(self, DB_THREAD)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment