ig we still free it?

This commit is contained in:
2026-07-03 00:54:52 +02:00
parent 5609ae5055
commit 5a055fb03e

View File

@@ -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));