summaryrefslogtreecommitdiff
path: root/src/libstddjb/stralloc_free.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/stralloc_free.c')
-rw-r--r--src/libstddjb/stralloc_free.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstddjb/stralloc_free.c b/src/libstddjb/stralloc_free.c
new file mode 100644
index 0000000..889b2ca
--- /dev/null
+++ b/src/libstddjb/stralloc_free.c
@@ -0,0 +1,10 @@
+/* ISC license. */
+
+#include <skalibs/alloc.h>
+#include <skalibs/stralloc.h>
+
+void stralloc_free (stralloc *sa)
+{
+ alloc_free(sa->s) ;
+ *sa = stralloc_zero ;
+}