From d64c4abcf1c1ae78e2613419040675e41a03afb9 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 8 Nov 2026 20:05:45 +0100 Subject: Silence leak detector. On exit remove the ongoing deflate buffer --- src/ot_fullscrape.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ot_fullscrape.c b/src/ot_fullscrape.c index bbceb0b..0cd1910 100644 --- a/src/ot_fullscrape.c +++ b/src/ot_fullscrape.c @@ -220,8 +220,10 @@ static void fullscrape_make_gzip(int taskid, ot_tasktype mode) { memset(&strm, 0, sizeof(strm)); strm.next_out = (uint8_t *)iovector.iov_base; strm.avail_out = OT_SCRAPE_CHUNK_SIZE; - if (deflateInit2(&strm, 7, Z_DEFLATED, 31, 9, Z_DEFAULT_STRATEGY) != Z_OK) - fprintf(stderr, "not ok.\n"); + if (deflateInit2(&strm, 7, Z_DEFLATED, 31, 9, Z_DEFAULT_STRATEGY) != Z_OK) { + free(iovector.iov_base); + return; + } if ((mode & TASK_TASK_MASK) == TASK_FULLSCRAPE) { strm.next_in = (uint8_t *)"d5:filesd"; -- cgit v1.3