summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2018-08-31 11:57:05 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2018-08-31 11:57:05 +0000
commit15ad126bda5df27e55447496be25f8f4cc3750f9 (patch)
tree3c3bac41ffeedf8aab924ce046374b4f8a285bbe
parente0bff475329118de3c9159f236a01bb0f2a796f9 (diff)
Pass the correct size to free(9) in the error path of db_ctf_decompress().
OK jasper@
-rw-r--r--sys/ddb/db_ctf.c4
1 files 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;
}