aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-07 06:48:10 -0500
committerMike Frysinger <vapier@gentoo.org>2009-02-07 06:48:10 -0500
commit28d7ee79e8a6bb8823eaf7b725eeaeb1bd94d8eb (patch)
tree03b0fe4f73fd4d1e822e906c3e5518d7ca3a02f4 /libsandbox/memory.c
parentlibsandbox: fix minor memleak from cmdline simplification (diff)
downloadsandbox-28d7ee79e8a6bb8823eaf7b725eeaeb1bd94d8eb.tar.gz
sandbox-28d7ee79e8a6bb8823eaf7b725eeaeb1bd94d8eb.tar.bz2
sandbox-28d7ee79e8a6bb8823eaf7b725eeaeb1bd94d8eb.zip
libsandbox: fix call to backtrace()
The size argument to backtrace() is the number of elements, not the number of bytes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox/memory.c')
-rw-r--r--libsandbox/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsandbox/memory.c b/libsandbox/memory.c
index d6f4b00..092f612 100644
--- a/libsandbox/memory.c
+++ b/libsandbox/memory.c
@@ -36,7 +36,7 @@ void free(void *ptr)
#ifdef HAVE_BACKTRACE
void *funcs[10];
int num_funcs;
- num_funcs = backtrace(funcs, sizeof(funcs));
+ num_funcs = backtrace(funcs, ARRAY_SIZE(funcs));
backtrace_symbols_fd(funcs, num_funcs, STDERR_FILENO);
#endif
}