mirror of
https://github.com/minetest/minetest.git
synced 2025-02-18 19:03:46 +01:00
Fix memory leak in redis backend, fixes #1325
This commit is contained in:
@ -116,6 +116,7 @@ void Database_Redis::saveBlock(MapBlock *block)
|
|||||||
throw FileNotGoodException(std::string("redis command 'HSET %s %s %b' failed: ") + ctx->errstr);
|
throw FileNotGoodException(std::string("redis command 'HSET %s %s %b' failed: ") + ctx->errstr);
|
||||||
if(reply->type == REDIS_REPLY_ERROR)
|
if(reply->type == REDIS_REPLY_ERROR)
|
||||||
throw FileNotGoodException("Failed to store block in Database");
|
throw FileNotGoodException("Failed to store block in Database");
|
||||||
|
freeReplyObject(reply);
|
||||||
|
|
||||||
// We just wrote it to the disk so clear modified flag
|
// We just wrote it to the disk so clear modified flag
|
||||||
block->resetModified();
|
block->resetModified();
|
||||||
|
Reference in New Issue
Block a user