]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
tests/conf: fix clang-analyzer warning 'Dereference of null pointer'
authorDaniel Salzman <daniel.salzman@nic.cz>
Sun, 19 Jul 2020 17:46:45 +0000 (19:46 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Sun, 19 Jul 2020 17:46:45 +0000 (19:46 +0200)
tests/knot/test_conf.c

index c7f6d51eae1c5695e9b692a303e8a8c6be463948..e1b3c439d601fbefc255cda2e8764adbdcea3b08 100644 (file)
@@ -1,4 +1,4 @@
-/*  Copyright (C) 2019 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/*  Copyright (C) 2020 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ static void check_name(const char *zone, const char *name, const char *ref)
 {
        knot_dname_t *z = knot_dname_from_str_alloc(zone);
 
-       char *file = get_filename(NULL, NULL, z, name);
+       char *file = get_filename(conf(), NULL, z, name);
        ok(file != NULL, "Get zonefile path for %s", zone);
        if (file != NULL) {
                ok(strcmp(file, ref) == 0, "Zonefile path compare %s", name);