about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-11-16 09:26:41 +0000
committerEric Wong <e@80x24.org>2022-11-16 09:47:12 +0000
commita2bd27527ed535b2d61e7d247ec2fbf4991b6618 (patch)
tree502854129677a613e6786c00c6e9853d279199a8
parent009b0233e0ffe467b3f25b959ae031da95ff169b (diff)
downloadmwrap-a2bd27527ed535b2d61e7d247ec2fbf4991b6618.tar.gz
Oops :x  Fortunately, most allocations are tracked to a Perl
location and the non-Perl code path is infrequently hit.
-rw-r--r--Mwrap.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mwrap.xs b/Mwrap.xs
index d5336fa..8aeb425 100644
--- a/Mwrap.xs
+++ b/Mwrap.xs
@@ -20,8 +20,8 @@ static SV *location_string(struct src_loc *l)
                 char **s = backtrace_symbols((void *)l->k, 1);
 
                 ret = newSVpvn(s[0], strlen(s[0]));
-        }
-        else {
+                free(s);
+        } else {
                 ret = newSVpvn(l->k, l->capa - 1);
         }