diff options
author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-12-04 11:41:39 +0000 |
---|---|---|
committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-12-17 21:18:56 +0000 |
commit | 88a08813800ed7ba7c927986421cee437f7f2233 (patch) | |
tree | 5ee2cc36e4a8aa6c6f35f47268f4912f1ab44b08 /usr/src/common | |
parent | 3dd4cd56e7843e01a8ab147a0d102cd4f6d732c1 (diff) | |
download | illumos-joyent-88a08813800ed7ba7c927986421cee437f7f2233.tar.gz |
13363 ctfconvert could support more granular ignore for missing debug data
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Rich Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/common')
-rw-r--r-- | usr/src/common/ctf/ctf_impl.h | 1 | ||||
-rw-r--r-- | usr/src/common/ctf/ctf_util.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/usr/src/common/ctf/ctf_impl.h b/usr/src/common/ctf/ctf_impl.h index b208cfb486..526e0f068c 100644 --- a/usr/src/common/ctf/ctf_impl.h +++ b/usr/src/common/ctf/ctf_impl.h @@ -312,6 +312,7 @@ extern void *ctf_alloc(size_t); extern void ctf_free(void *, size_t); extern char *ctf_strdup(const char *); +extern void ctf_strfree(char *); extern const char *ctf_strerror(int); extern void ctf_dprintf(const char *, ...); diff --git a/usr/src/common/ctf/ctf_util.c b/usr/src/common/ctf/ctf_util.c index 550195b5e1..f909bbc4af 100644 --- a/usr/src/common/ctf/ctf_util.c +++ b/usr/src/common/ctf/ctf_util.c @@ -149,6 +149,17 @@ ctf_strdup(const char *s1) } /* + * Free a string which was allocated via ctf_alloc() + */ +void +ctf_strfree(char *s) +{ + if (s == NULL) + return; + ctf_free(s, strlen(s) + 1); +} + +/* * Store the specified error code into errp if it is non-NULL, and then * return NULL for the benefit of the caller. */ |