mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-22 04:18:01 +00:00
Fix memory leaks from errors while reading strings or numbers
This commit is contained in:
parent
391db023e0
commit
c6077f7e54
@ -404,6 +404,7 @@ again:
|
||||
c = j->peek(j);
|
||||
if (c < '0' || c > '9') {
|
||||
j->error = "Exponent without digits";
|
||||
free(val.buf);
|
||||
return NULL;
|
||||
}
|
||||
while (c >= '0' && c <= '9') {
|
||||
@ -467,6 +468,7 @@ again:
|
||||
}
|
||||
} else {
|
||||
j->error = "Found backslash followed by unknown character";
|
||||
free(val.buf);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user