Fix crash setting expire on a key with an existing subkey expiration
Former-commit-id: 4858fd893c8e638b0efdcd3ab2c6dc188a6dc6bd
This commit is contained in:
parent
945a7b69f1
commit
f8884fed3a
@ -801,7 +801,8 @@ public:
|
||||
void expireSubKey(const char *szSubkey, long long 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(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user