VirtualBox

Opened 7 years ago

Last modified 7 years ago

#16838 closed defect

sf_glob_alloc: memory leak on str_name — at Initial Version

Reported by: ColinIanKing Owned by:
Component: guest additions Version: VirtualBox 5.1.22
Keywords: memory leak Cc:
Guest type: Linux Host type: Linux

Description

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 (0)

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette