ref: b90572583508fba36bfb29730eff90c530ffefa1
parent: 5ed8d825c11f41aadedf4b88eba6364dc955f52f
author: mkf <mkf@cloud9p.org>
date: Tue Nov 28 22:42:16 EST 2023
lladd: allocate memory properly! while it didn't made any impact, it's because our malloc currently have huge segments. once we move to smaller segments, this will be a problem.
--- a/libc/lladd.c
+++ b/libc/lladd.c
@@ -10,7 +10,7 @@
if(last->next != nil)
return LL_ERR;
- temp = malloc(sizeof(ll_t*));
+ temp = (ll_t*)malloc(sizeof(ll_t));
temp->val = data;
temp->next = nil;