valgrind findings

This commit is contained in:
John Kerl 2017-06-12 23:51:39 -04:00
parent 726b84991d
commit d09de40b75

View file

@ -213,6 +213,8 @@ static lrec_t* lrec_reader_stdio_csv_process(void* pvstate, void* pvhandle, cont
if (string_starts_with(pe->value, "\xef\xbb\xbf")) {
// Strip UTF-8 BOM if any
slls_append(pheader_fields, mlr_strdup_or_die(&pe->value[3]), FREE_ENTRY_VALUE);
if (pe->free_flag & FREE_ENTRY_VALUE)
free(pe->value);
} else {
slls_append(pheader_fields, pe->value, pe->free_flag);
}