Fix crashes in res_odbc.