From 85e0434657729bd43b195a00a6673e79cf720598 Mon Sep 17 00:00:00 2001 From: bluhm Date: Fri, 31 Aug 2018 11:57:04 +0000 Subject: [PATCH] Pass the correct size to free(9) in the error path of db_ctf_decompress(). OK jasper@ --- sys/ddb/db_ctf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ddb/db_ctf.c b/sys/ddb/db_ctf.c index 5671d5c96d6..0f76b361407 100644 --- a/sys/ddb/db_ctf.c +++ b/sys/ddb/db_ctf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_ctf.c,v 1.26 2018/01/09 10:19:25 mpi Exp $ */ +/* $OpenBSD: db_ctf.c,v 1.27 2018/08/31 11:57:04 bluhm Exp $ */ /* * Copyright (c) 2016-2017 Martin Pieuchot @@ -551,7 +551,7 @@ db_ctf_decompress(const char *buf, size_t size, off_t len) return data; exit: - free(data, M_DEVBUF, sizeof(*data)); + free(data, M_DEVBUF, len); return NULL; } -- 2.20.1