diff -Brau a/util/odbcinstw.c b/util/odbcinstw.c --- a/util/odbcinstw.c 2014-04-23 21:54:40.000000000 +0200 +++ b/util/odbcinstw.c 2015-05-08 15:03:59.981912566 +0200 @@ -74,7 +74,8 @@ SQLGetPrivateProfileString. So, taking precautions against unititialized values in the allocated buffer. */ - memset(ret, 0, cbRetBuffer + 1); + if (ret) + memset(ret, 0, cbRetBuffer + 1); } else ret= NULL; @@ -105,7 +106,8 @@ x_free(section); x_free(entry); x_free(def); - x_free(ret); + if (ret) + free(ret); x_free(filename); return rc;