Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call MMDB_free_entry_data_list() on libmaxminddb failures #39

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/MaxMind/DB/Reader/XS.xs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ static void call_data_callback(MMDB_s *mmdb, SV *data_callback,
int status = MMDB_get_entry_data_list(record_entry, &entry_data_list);
if (MMDB_SUCCESS != status) {
const char *error = MMDB_strerror(status);
MMDB_free_entry_data_list(entry_data_list);
croak(
"MaxMind::DB::Reader::XS - Entry data error looking at offset %i: %s",
record_entry->offset, error
Expand Down Expand Up @@ -312,7 +311,6 @@ _raw_metadata(self, mmdb)
int status = MMDB_get_metadata_as_entry_data_list(mmdb, &entry_data_list);
if (MMDB_SUCCESS != status) {
const char *error = MMDB_strerror(status);
MMDB_free_entry_data_list(entry_data_list);
croak(
"MaxMind::DB::Reader::XS - Error getting metadata: %s",
error
Expand Down Expand Up @@ -355,7 +353,6 @@ __data_for_address(self, mmdb, ip_address)
get_status = MMDB_get_entry_data_list(&result.entry, &entry_data_list);
if (MMDB_SUCCESS != get_status) {
const char *get_error = MMDB_strerror(get_status);
MMDB_free_entry_data_list(entry_data_list);
croak(
"MaxMind::DB::Reader::XS - Entry data error looking up \"%s\": %s",
ip_address, get_error
Expand Down