mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
Use GA_DEEP_CLEAR where appropriate
This commit is contained in:
@@ -2580,13 +2580,11 @@ char_u *get_scriptname(scid_T id)
|
||||
}
|
||||
|
||||
# if defined(EXITFREE) || defined(PROTO)
|
||||
void free_scriptnames(void)
|
||||
void free_scriptnames()
|
||||
{
|
||||
for (int i = script_items.ga_len; i > 0; --i)
|
||||
free(SCRIPT_ITEM(i).sn_name);
|
||||
ga_clear(&script_items);
|
||||
# define FREE_SCRIPTNAME(item) free((item)->sn_name)
|
||||
GA_DEEP_CLEAR(&script_items, scriptitem_T, FREE_SCRIPTNAME);
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user