Skip to content

Commit ea16827

Browse files
committed
[fix] free json-encoded string in parser client output
1 parent 38c6c26 commit ea16827

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/address_parser_cli.c

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ int main(int argc, char **argv) {
118118
for (int i = 0; i < parsed->num_components; i++) {
119119
char *json_string = json_encode_string(parsed->components[i]);
120120
printf(" \"%s\": %s%s\n", parsed->labels[i], json_string, i < parsed->num_components - 1 ? "," : "");
121+
free(json_string);
121122
}
122123
printf("}\n");
123124
printf("\n");

0 commit comments

Comments
 (0)