fixed segmentation error

fixed segmentation error on the ip2location_open_mem