Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
de-allocate entry via enif_free() when name allocation fails
In the event that an entry could be allocated, but the name allocation for the entry fails, free the entry with enif_free(). While updating Erlang on Gentoo I noticed the following compiler warning: c_src/mqtree.c:208:5: warning: ‘free’ called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] I'm not familiar with erl_nif, but it looks like this is a legitimate warning and the memory should be freed via the enif_free() interface.
- Loading branch information