Commit 5620e738 authored by Mark Karpilovskij's avatar Mark Karpilovskij

geoip: fixed memory leak

parent 0e843763
......@@ -136,6 +136,7 @@ geodb_t *geodb_open(const char *filename)
}
int mmdb_error = MMDB_open(filename, MMDB_MODE_MMAP, db);
if (mmdb_error != MMDB_SUCCESS) {
free(db);
return NULL;
}
return db;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment