rebuildhosts: Fix SEGV when not online
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Jun 2015 15:55:55 +0000 (17:55 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Jun 2015 15:55:55 +0000 (17:55 +0200)
Fixes #10867

src/misc-progs/rebuildhosts.c

index 21c5236..fdaeed6 100644 (file)
@@ -82,8 +82,6 @@ int main(int argc, char *argv[])
        if (!(gw = fopen(CONFIG_ROOT "/red/remote-ipaddress", "r")))
        {
                fprintf(stderr, "Couldn't open remote-ipaddress file\n");
-               fclose(gw);
-               gw = NULL;
                exit(1);
        }