Memory leak in codes_count (if invalid message)

This commit is contained in:
Shahram Najm 2020-05-09 16:32:26 +01:00
parent f67fe2567f
commit d43fd87c74
1 changed files with 1 additions and 1 deletions

View File

@ -58,9 +58,9 @@ static int count_messages(FILE* in, int message_type, unsigned long* count)
} }
} }
if (mesg && !err) { if (mesg && !err) {
grib_context_free(c, mesg);
(*count)++; (*count)++;
} }
grib_context_free(c, mesg);
} }
} }