mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
Free IO context if any in RDB loading code.
Thanks to @oranagra for spotting this bug.
This commit is contained in:
parent
419dacfeaf
commit
db791a1eee
@ -1415,6 +1415,10 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) {
|
||||
/* Call the rdb_load method of the module providing the 10 bit
|
||||
* encoding version in the lower 10 bits of the module ID. */
|
||||
void *ptr = mt->rdb_load(&io,moduleid&1023);
|
||||
if (io.ctx) {
|
||||
moduleFreeContext(io.ctx);
|
||||
zfree(io.ctx);
|
||||
}
|
||||
|
||||
/* Module v2 serialization has an EOF mark at the end. */
|
||||
if (io.ver == 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user