]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
label: add missing assert() to label_ops_set()
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 15:47:16 +0000 (17:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 15:51:26 +0000 (17:51 +0200)
src/basic/label.c

index 47d19678255d4ed80926d3ea1ec1a595afe6e1c1..18f6214fad4f3864c2bda64fb42818988633a034 100644 (file)
@@ -4,10 +4,13 @@
 #include <stddef.h>
 
 #include "label.h"
+#include "macro.h"
 
 static const LabelOps *label_ops = NULL;
 
 int label_ops_set(const LabelOps *ops) {
+        assert(ops);
+
         if (label_ops)
                 return -EBUSY;