mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 09:32:58 +00:00
(libretro-db) plug memory leak.
This commit is contained in:
parent
3133b67da5
commit
8207ab56c1
@ -130,6 +130,7 @@ int libretrodb_create(RFILE *fd, libretrodb_value_provider value_provider,
|
||||
|
||||
retro_fseek(fd, sizeof(libretrodb_header_t), SEEK_CUR);
|
||||
|
||||
item.type = RDT_NULL;
|
||||
while ((rv = value_provider(ctx, &item)) == 0)
|
||||
{
|
||||
if ((rv = validate_document(&item)) < 0)
|
||||
@ -138,6 +139,8 @@ int libretrodb_create(RFILE *fd, libretrodb_value_provider value_provider,
|
||||
if ((rv = rmsgpack_dom_write(fd, &item)) < 0)
|
||||
goto clean;
|
||||
|
||||
rmsgpack_dom_value_free(&item);
|
||||
item.type = RDT_NULL;
|
||||
item_count++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user