summaryrefslogtreecommitdiff
path: root/lib9p/tests/test_server/fs_whoami.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-16 09:05:28 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-16 09:05:28 -0600
commit29ad1efc7c6de44a965db9f181165b72a9ef8ff1 (patch)
treee13794366a09d0480253076d458b413faa5680a5 /lib9p/tests/test_server/fs_whoami.c
parent802ed1e3cd0252cafd1be2aada0addf4d3f7eb2e (diff)
parenta5061fa634af1e7011182e1c115151dd96af8393 (diff)
Merge branch 'lukeshu/9p-fix-flush'
Diffstat (limited to 'lib9p/tests/test_server/fs_whoami.c')
-rw-r--r--lib9p/tests/test_server/fs_whoami.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib9p/tests/test_server/fs_whoami.c b/lib9p/tests/test_server/fs_whoami.c
index 560e31f..653ac4b 100644
--- a/lib9p/tests/test_server/fs_whoami.c
+++ b/lib9p/tests/test_server/fs_whoami.c
@@ -5,7 +5,9 @@
*/
#include <stdio.h> /* for snprintf() */
-#include <stdlib.h> /* for malloc(), realloc(), free() */
+#include <stdlib.h> /* for realloc(), free() */
+
+#include <libmisc/alloc.h>
#include "fs_whoami.h"
@@ -89,7 +91,7 @@ static lo_interface lib9p_srv_fio whoami_file_fopen(struct whoami_file *self, st
assert(self);
assert(ctx);
- struct whoami_fio *ret = malloc(sizeof(struct whoami_fio));
+ struct whoami_fio *ret = heap_alloc(1, struct whoami_fio);
ret->parent = self;
ret->buf_len = 0;
ret->buf = NULL;