Bugzilla – Bug 674
Do not free ponters given by getenv()
Last modified: 2015-06-02 09:34:28 CEST
Created attachment 284 [details]
patch, modify paths as needed
In the file unbound/libunbound/libunbound.c, if Windows is detected as the OS and no hosts file is specified, libunbound uses getenv() to determine the system-wide hosts file. It should not be calling free() on the pointer returned by getenv(), see here: https://stackoverflow.com/questions/4237812/should-i-free-delete-char-returned-by-getenv
Simply removing the call to free() should be sufficient to address the issue.
Thank you for the fixup. Committed.