]> git.ipfire.org Git - collecty.git/commitdiff
queue: Allocate the correct amount of memory
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Sep 2025 16:41:56 +0000 (16:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Sep 2025 16:41:56 +0000 (16:41 +0000)
This has been found by the clang static analyzer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/queue.c

index c4a5576ecc5663af97be1c01aec839307369af82..bd1fd4c0a1616ed55eba90907c9d4dc83b262cdc 100644 (file)
@@ -261,7 +261,7 @@ int collecty_queue_submit(collecty_queue* self,
                return collecty_queue_object_append_sample(self, module, object, o, sample);
 
        // Allocate some memory
-       o = calloc(1, sizeof(*self));
+       o = calloc(1, sizeof(*o));
        if (!o)
                return -errno;