]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
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 21c523600c75b5223106d6aeb284db40f30e9531..fdaeed618ee446ad11ad9246c7d6deb957494203 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");
        if (!(gw = fopen(CONFIG_ROOT "/red/remote-ipaddress", "r")))
        {
                fprintf(stderr, "Couldn't open remote-ipaddress file\n");
-               fclose(gw);
-               gw = NULL;
                exit(1);
        }
 
                exit(1);
        }