Fix leaks in MMDB_open()

If obtaining the database size fails free the allocated memory and close
the file descriptor.