-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
func: fix use after free on function unload
Functions are stored in lists inside module objects. Module objects are stored in a hash table, where key is a package name. But the key was a pointer at one of module's function definition object. Therefore, when that function was deleted, its freed package name memory was still in the hash key, and could be accessed, when another function was deleted. Now module does not use memory of its functions, and keep a copy of the package name. (cherry picked from commit fa2893e)
- Loading branch information
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters