moved mysql_close to inside "get" branch

stopped segmentation fault