Fix Swapdb crash
Former-commit-id: 1155f5ac6345591fb40a3ce77f81e11485a521dd
This commit is contained in:
parent
247c916f69
commit
d69de1c689
@ -1222,7 +1222,7 @@ int dbSwapDatabases(long id1, long id2) {
|
||||
if (id1 < 0 || id1 >= cserver.dbnum ||
|
||||
id2 < 0 || id2 >= cserver.dbnum) return C_ERR;
|
||||
if (id1 == id2) return C_OK;
|
||||
redisDb aux(g_pserver->db[id1]);
|
||||
redisDb aux = g_pserver->db[id1];
|
||||
redisDb *db1 = &g_pserver->db[id1], *db2 = &g_pserver->db[id2];
|
||||
|
||||
/* Swap hash tables. Note that we don't swap blocking_keys,
|
||||
|
Loading…
x
Reference in New Issue
Block a user