about summary refs log tree commit homepage
path: root/Mwrap.xs
diff options
context:
space:
mode:
Diffstat (limited to 'Mwrap.xs')
-rw-r--r--Mwrap.xs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Mwrap.xs b/Mwrap.xs
index 6adf975..9ebc082 100644
--- a/Mwrap.xs
+++ b/Mwrap.xs
@@ -25,7 +25,7 @@ static SV *location_string(struct src_loc *l)
                         sv_catpvf(ret, ":%zu", l->lineno);
         }
         if (l->bt_len) {
-                char **s = bt_syms(l->bt, l->bt_len);
+                AUTO_FREE char **s = bt_syms(l->bt, l->bt_len);
                 if (s) {
                         if (l->f)
                                 sv_catpvs(ret, "\n");
@@ -33,7 +33,6 @@ static SV *location_string(struct src_loc *l)
                         for (uint32_t i = 1; i < l->bt_len; ++i)
                                 sv_catpvf(ret, "\n%s", s[i]);
                 }
-                free(s);
         }
         return ret;
 }