Fix crash setting expire on a key with an existing subkey expiration
Former-commit-id: 4858fd893c8e638b0efdcd3ab2c6dc188a6dc6bd
This commit is contained in:
parent
363fbbb54c
commit
2181eca5de
@ -801,7 +801,8 @@ public:
|
|||||||
void expireSubKey(const char *szSubkey, long long when)
|
void expireSubKey(const char *szSubkey, long long when)
|
||||||
{
|
{
|
||||||
auto itrInsert = std::lower_bound(m_vecexpireEntries.begin(), m_vecexpireEntries.end(), when);
|
auto itrInsert = std::lower_bound(m_vecexpireEntries.begin(), m_vecexpireEntries.end(), when);
|
||||||
m_vecexpireEntries.emplace(itrInsert, when, sdsdup(szSubkey));
|
const char *subkey = (szSubkey) ? sdsdup(szSubkey) : nullptr;
|
||||||
|
m_vecexpireEntries.emplace(itrInsert, when, subkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FEmpty() const noexcept { return m_vecexpireEntries.empty(); }
|
bool FEmpty() const noexcept { return m_vecexpireEntries.empty(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user