Fixes the double free on certain glibc vers.

This is one of the reasons why the build fails.