Skip to content

Commit

Permalink
Fix leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbeyssac committed Aug 21, 2024
1 parent c641d3f commit 34317de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions caster/ntrip_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,11 @@ int ntrip_handle_raw_chunk(struct ntrip_state *st, struct bufferevent *bev) {
if (sscanf(line, "%zx", &chunk_len) == 1) {
// ntrip_log(st, LOG_DEBUG, "ok chunk_len: \"%s\" (%zu)\n", line, chunk_len);
} else {
free(line);
ntrip_log(st, LOG_INFO, "failed chunk_len: \"%s\"\n", line);
return 0;
}
free(line);
st->chunk_state = CHUNK_IN_PROGRESS;
st->chunk_len = chunk_len;
} else if (st->chunk_state == CHUNK_IN_PROGRESS) {
Expand Down

0 comments on commit 34317de

Please sign in to comment.