summaryrefslogtreecommitdiffstats
path: root/exec_stack.h
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2013-12-23 17:13:19 -0600
committerNicolas Williams <nico@cryptonector.com>2014-07-07 19:33:19 -0500
commit80a9937e48b759b53f6a8aaac7f39266ea7c8a1e (patch)
tree4131156977149a85c7f31178cbfe120efa954805 /exec_stack.h
parentb963ebaf1d0dc1ef5558a7dc4404e35cb4085fae (diff)
exec_stack.h was not using jv_mem_realloc()
Diffstat (limited to 'exec_stack.h')
-rw-r--r--exec_stack.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/exec_stack.h b/exec_stack.h
index 95fca713..ce4ab83c 100644
--- a/exec_stack.h
+++ b/exec_stack.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+#include "jv_alloc.h"
struct determine_alignment {
char x;
@@ -53,7 +54,7 @@ static void stack_reallocate(struct stack* s, size_t sz) {
char* old_mem_start = s->mem_end - old_mem_length;
int new_mem_length = align_round_up((old_mem_length + sz + 256) * 2);
- char* new_mem_start = realloc(old_mem_start, new_mem_length);
+ char* new_mem_start = jv_mem_realloc(old_mem_start, new_mem_length);
memmove(new_mem_start + (new_mem_length - old_mem_length),
new_mem_start, old_mem_length);
s->mem_end = new_mem_start + new_mem_length;