Whitetigerswt / SAMP-geoip

Geographical IP based on MaxMind databases for SA-MP
22 stars 19 forks source link

Removed Unnecessary Opening of Database and Leak #3

Closed GtakillerIV closed 9 years ago

GtakillerIV commented 9 years ago

For some reason you are opening the same Database file twice and only closing one. Over time this quickly makes the Linux system reach its maximum opened file limit which causes unwanted behaviour such as the server not being able to write to the samp.ban file and so on. Also you forgot to free the result from the first query in GetIPCountry.