summaryrefslogtreecommitdiff
path: root/usr/src/common/ctf/ctf_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common/ctf/ctf_util.c')
-rw-r--r--usr/src/common/ctf/ctf_util.c11
1 files changed, 11 insertions, 0 deletions
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.
*/