Skip to content

Commit

Permalink
fix memory leak parsing invalid json strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jun 24, 2020
1 parent 79efb37 commit 3d60dc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sentry_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ tokens_to_value(jsmntok_t *tokens, size_t token_count, const char *buf,
if (decode_string_inplace(string)) {
rv = sentry__value_new_string_owned(string);
} else {
sentry_free(string);
rv = sentry_value_new_null();
}
break;
Expand Down

0 comments on commit 3d60dc0

Please sign in to comment.