diff options
| author | Ben Winston | 2024-05-05 15:19:19 -0400 |
|---|---|---|
| committer | Ben Winston | 2024-05-05 15:21:24 -0400 |
| commit | a0095d776b70fd05700be64f5185e133f898ec09 (patch) | |
| tree | 6f716214be011579b771787ee23bf2cb516b220f | |
| parent | cab0455b878c04ce40208f9258cc147a4683f5fc (diff) | |
bugfix: memory
| -rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -150,8 +150,11 @@ char** search(int argc, char* argv[]) { // try and get a string datapoint = toml_string_in(book, field); if (datapoint.ok) { - if (!regex_match(search_opts.args[i], datapoint.u.s)) + if (!regex_match(search_opts.args[i], datapoint.u.s)) { + free(datapoint.u.s); break; + } + free(datapoint.u.s); } else { continue; } |
