mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-04-03 17:19:05 +00:00
Remember how to keep a parse tree around after the parser is closed
This commit is contained in:
parent
5878213516
commit
b7df68c164
@ -1049,8 +1049,8 @@ json_object *read_filter(const char *fname) {
|
||||
fprintf(stderr, "%s: %s\n", fname, jp->error);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// XXX clone tree instead of leaving pull open
|
||||
json_disconnect(filter);
|
||||
json_end(jp);
|
||||
fclose(fp);
|
||||
return filter;
|
||||
}
|
||||
@ -1063,8 +1063,8 @@ json_object *parse_filter(const char *s) {
|
||||
fprintf(stderr, "%s\n", jp->error);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// XXX clone tree instead of leaving pull open
|
||||
json_disconnect(filter);
|
||||
json_end(jp);
|
||||
return filter;
|
||||
}
|
||||
|
||||
@ -1301,5 +1301,9 @@ int main(int argc, char **argv) {
|
||||
mbtiles_close(outdb, argv[0]);
|
||||
}
|
||||
|
||||
if (filter != NULL) {
|
||||
json_free(filter);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user