Opened 7 years ago
Closed 7 years ago
#16838 closed defect (fixed)
sf_glob_alloc: memory leak on str_name
| Reported by: | ColinIanKing | Owned by: | |
|---|---|---|---|
| Component: | guest additions | Version: | VirtualBox 5.1.22 |
| Keywords: | memory leak | Cc: | |
| Guest type: | Linux | Host type: | Linux |
Description (last modified by )
Function sf_glob_alloc() in src/VBox/Additions/linux/sharedfolders/vfsmod.c allocates a buffer for str_name and leaks this information. The leak occurs on the check:
/* Check if NLS charset is valid and not points to UTF8 table */
if (info->nls_name[0])
{
if (_IS_UTF8(info->nls_name))
sf_g->nls = NULL;
else
{
sf_g->nls = load_nls(info->nls_name);
if (!sf_g->nls)
{
err = -EINVAL;
LogFunc(("failed to load nls %s\n", info->nls_name));
goto fail1;
}
}
}
..the failed to load nls error exit path jumps to fail1 which does not free str_name, which looks like a memory leak to me.
Change History (2)
comment:1 by , 7 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.


Thanks, fixed in r67803.