]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Move event filter test's event categories from stack to .data
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Tue, 16 Apr 2019 22:45:21 +0000 (18:45 -0400)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 25 Jun 2019 12:17:39 +0000 (12:17 +0000)
Event categories must not be allocated on the stack.  Categories must be
accessible for the duration of the program runtime.

src/lib/test-event-filter.c

index 082e57cb45be3d7685f920ce80475a12d700794b..840c3c43e8d9924c3149dd149d71bf608d1569b5 100644 (file)
@@ -146,10 +146,10 @@ static void test_event_filter_inc_int(void)
 
 static void test_event_filter_parent_category_match(void)
 {
-       struct event_category parent_category = {
+       static struct event_category parent_category = {
                .name = "parent",
        };
-       struct event_category child_category = {
+       static struct event_category child_category = {
                .parent = &parent_category,
                .name = "child",
        };