diff --git a/src/db.cpp b/src/db.cpp index 97bcc86df..81e8a25af 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -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,