You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions like int vmaf_model_feature_overload(VmafModel *model, const char *feature_name, VmafFeatureDictionary *opts_dict) sometimes free the passed in dictionary and sometimes doesn't. It doesn't seem to signal if the dictionary has been cleaned up or not to the caller other than by statically analyzing different error paths within the function.
This seems to be asking for memory-leaks, double-frees, and use-after-frees.
IMO it would make more sense for functions that might free dictionaries to accept a VmafDictionary** and null the inner pointer on free that same way vmaf_dictionary_free works.
The text was updated successfully, but these errors were encountered:
Agree with you, thanks for the feedback. I think probably we'll need to deprecate this function and replace with a better API in the next libvmaf release (v3.0).
Functions like
int vmaf_model_feature_overload(VmafModel *model, const char *feature_name, VmafFeatureDictionary *opts_dict)
sometimes free the passed in dictionary and sometimes doesn't. It doesn't seem to signal if the dictionary has been cleaned up or not to the caller other than by statically analyzing different error paths within the function.This seems to be asking for memory-leaks, double-frees, and use-after-frees.
IMO it would make more sense for functions that might free dictionaries to accept a
VmafDictionary**
and null the inner pointer on free that same wayvmaf_dictionary_free
works.The text was updated successfully, but these errors were encountered: