From 5a055fb03e35b553b5b1c7d30731bada6ab00031 Mon Sep 17 00:00:00 2001 From: drath Date: Fri, 3 Jul 2026 00:54:52 +0200 Subject: [PATCH] ig we still free it? --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index 007968d..100f914 100644 --- a/src/main.c +++ b/src/main.c @@ -183,6 +183,7 @@ int main(void) { struct sensors_t *sensors = malloc(sizeof(*sensors)); // no actual point in mallocing and it is ever so sligtly slower to access heap vs stack, but its cool if (sensors == nullptr) { applog(LOG_ERR, "can't allocate mem for the sensor struct. You don't got %lu bytes bro?", sizeof(*sensors)); + free(sensors); return 1; } applog(LOG_INF, "sensor struct allocated, size is %lu bytes", sizeof(*sensors));