aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-08 19:06:04 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-08 19:06:04 -0400
commitfd2e8d9d2bc3dcce3707823c0ec0643f066c0b3f (patch)
tree117d58d3bf1fa306ab4bc5acd7ef15cafb2d251a /src
parent269e2c5eb511ef74fe293c428202ddeb38ada0db (diff)
downloadstasis-fd2e8d9d2bc3dcce3707823c0ec0643f066c0b3f.tar.gz
Fix incorrect size used by realloc
Diffstat (limited to 'src')
-rw-r--r--src/lib/delivery/delivery_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/delivery/delivery_test.c b/src/lib/delivery/delivery_test.c
index 3ba9d56..ce6d73d 100644
--- a/src/lib/delivery/delivery_test.c
+++ b/src/lib/delivery/delivery_test.c
@@ -21,10 +21,10 @@ int tests_add(struct Tests *tests, struct Test *x) {
#ifdef DEBUG
const size_t old_alloc = tests->num_alloc;
#endif
- struct Test **tmp = realloc(tests->test, tests->num_alloc++ * sizeof(*tests->test));
+ struct Test **tmp = realloc(tests->test, tests->num_alloc++ * sizeof(**tests->test));
SYSDEBUG("Increasing size of test array: %zu -> %zu", old_alloc, tests->num_alloc);
if (!tmp) {
- SYSDEBUG("Failed to allocate %zu bytes for test array", tests->num_alloc * sizeof(*tests->test));
+ SYSDEBUG("Failed to allocate %zu bytes for test array", tests->num_alloc * sizeof(**tests->test));
return -1;
}
tests->test = tmp;