mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci(coverity): annotate register_cfunc as leaking memory
register_cfunc allocates a ufunc_T, but doesn't store the pointer anywhere before returning. The uf_name member variable is stored in a hashtable and used to lookup the ufunc_T later, but that's too much for Coverity to track. Adding the annotation ensures that any new callers to register_cfunc don't pop up as new "leaks" in the Coverity scans.
This commit is contained in:
parent
1da7e2b8ca
commit
6954c0ba0d
@ -3598,5 +3598,6 @@ char_u *register_cfunc(cfunc_T cb, cfunc_free_T cb_free, void *state)
|
||||
STRCPY(fp->uf_name, name);
|
||||
hash_add(&func_hashtab, UF2HIKEY(fp));
|
||||
|
||||
// coverity[leaked_storage]
|
||||
return fp->uf_name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user