summaryrefslogtreecommitdiff
path: root/usr/src/common/ctf/ctf_open.c
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2020-11-10 23:31:51 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2020-11-12 21:15:20 +0000
commita676209deb2ce5d0c98f331659de25e2483f8c4c (patch)
treeee2f5ed90711752a745594283ac1da73feb4bd84 /usr/src/common/ctf/ctf_open.c
parenteffb27ee30c48fe502152c38487ced379d9f8693 (diff)
downloadillumos-joyent-a676209deb2ce5d0c98f331659de25e2483f8c4c.tar.gz
13252 ctf_update()/ctf_dwarf_convert_function() leak memory
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/common/ctf/ctf_open.c')
-rw-r--r--usr/src/common/ctf/ctf_open.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/src/common/ctf/ctf_open.c b/usr/src/common/ctf/ctf_open.c
index 82b396e825..fe0644b1b0 100644
--- a/usr/src/common/ctf/ctf_open.c
+++ b/usr/src/common/ctf/ctf_open.c
@@ -26,6 +26,7 @@
*/
/*
* Copyright (c) 2015, Joyent, Inc. All rights reserved.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
#include <ctf_impl.h>
@@ -936,6 +937,10 @@ ctf_close(ctf_file_t *fp)
if (fp->ctf_strtab.cts_data != NULL)
ctf_sect_munmap(&fp->ctf_strtab);
}
+ if (fp->ctf_flags & LCTF_FREE) {
+ ctf_data_free((void *)fp->ctf_data.cts_data,
+ fp->ctf_data.cts_size);
+ }
if (fp->ctf_data.cts_name != _CTF_NULLSTR &&
fp->ctf_data.cts_name != NULL) {