]> git.ipfire.org Git - location/libloc.git/commitdiff
writer: I forgot to initalize the country list
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Mar 2022 11:09:25 +0000 (11:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Mar 2022 11:09:25 +0000 (11:09 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/writer.c

index 67676a48374e94c1e6c382252be41ee308f1ad4f..4420972975b7df36e79244bf464db3c9f07e80b4 100644 (file)
@@ -116,6 +116,13 @@ LOC_EXPORT int loc_writer_new(struct loc_ctx* ctx, struct loc_writer** writer,
                return r;
        }
 
+       // Initialize countries list
+       r = loc_country_list_new(ctx, &w->country_list);
+       if (r) {
+               loc_writer_unref(w);
+               return r;
+       }
+
        // Load the private keys to sign databases
        if (fkey1) {
                r = parse_private_key(w, &w->private_key1, fkey1);