Fix early DECREF
This commit is contained in:
parent
5fd68b34c7
commit
5ebad6db14
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include "_pylibmcmodule.h"
|
#include "_pylibmcmodule.h"
|
||||||
|
|
||||||
|
|
||||||
/* {{{ _pylibmc.client implementation */
|
/* {{{ _pylibmc.client implementation */
|
||||||
/* {{{ Type methods */
|
/* {{{ Type methods */
|
||||||
static PylibMC_Client *PylibMC_ClientType_new(PyTypeObject *type,
|
static PylibMC_Client *PylibMC_ClientType_new(PyTypeObject *type,
|
||||||
@ -226,7 +227,6 @@ static PyObject *_PylibMC_RunSetCommand(PylibMC_Client *self,
|
|||||||
|
|
||||||
raw_val = PyString_AS_STRING(store_val);
|
raw_val = PyString_AS_STRING(store_val);
|
||||||
raw_val_len = PyString_GET_SIZE(store_val);
|
raw_val_len = PyString_GET_SIZE(store_val);
|
||||||
Py_DECREF(store_val);
|
|
||||||
|
|
||||||
rc = f(self->mc, key, key_len, raw_val, raw_val_len, time,
|
rc = f(self->mc, key, key_len, raw_val, raw_val_len, time,
|
||||||
store_flags);
|
store_flags);
|
||||||
@ -244,6 +244,7 @@ static PyObject *_PylibMC_RunSetCommand(PylibMC_Client *self,
|
|||||||
default:
|
default:
|
||||||
PylibMC_ErrFromMemcached(self, fname, rc);
|
PylibMC_ErrFromMemcached(self, fname, rc);
|
||||||
}
|
}
|
||||||
|
Py_DECREF(store_val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user