summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-15 15:58:31 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-15 15:58:31 -0600
commitdb9a58f48c6eae16fbfcd89d59b09e123dbed54f (patch)
tree8e20dd9bc3ddf7b766714a57a9d33259c0b91165 /cmd/sbc_harness
parent03f29736acfcfaee6f263fd1461f96ccae3696da (diff)
libmisc: Add alloc.h to help detect wrong alloc sizes
Lo and behold, there was a mistake in chan.c.
Diffstat (limited to 'cmd/sbc_harness')
-rw-r--r--cmd/sbc_harness/fs_harness_uptime_txt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/sbc_harness/fs_harness_uptime_txt.c b/cmd/sbc_harness/fs_harness_uptime_txt.c
index 1425bf9..dd5c681 100644
--- a/cmd/sbc_harness/fs_harness_uptime_txt.c
+++ b/cmd/sbc_harness/fs_harness_uptime_txt.c
@@ -5,10 +5,10 @@
*/
#include <stdio.h> /* for snprintf() */
-#include <stdlib.h> /* for malloc(), free() */
#include <libhw/generic/alarmclock.h>
#include <util9p/static.h>
+#include <libmisc/alloc.h> /* for heap_alloc(), free() */
#include "fs_harness_uptime_txt.h"
@@ -91,7 +91,7 @@ static lo_interface lib9p_srv_fio uptime_file_fopen(struct uptime_file *self, st
assert(self);
assert(ctx);
- struct uptime_fio *ret = malloc(sizeof(struct uptime_fio));
+ struct uptime_fio *ret = heap_alloc(1, struct uptime_fio);
ret->parent = self;
ret->buf_len = 0;