"out of memory" bug fix
authorBart De Schuymer <bdschuym@pandora.be>
Wed, 27 Aug 2003 16:59:39 +0000 (16:59 +0000)
committerBart De Schuymer <bdschuym@pandora.be>
Wed, 27 Aug 2003 16:59:39 +0000 (16:59 +0000)
communication.c

index d4b1c4d..4d02b05 100644 (file)
@@ -623,9 +623,9 @@ static void retrieve_from_file(char *filename, struct ebt_replace *repl,
        if (repl->nentries) {
                counters = (struct ebt_counter *)
                   malloc(repl->nentries * sizeof(struct ebt_counter));
+               repl->counters = sparc_cast counters;
                if (!repl->counters)
                        print_memory();
-               repl->counters = sparc_cast counters;
        } else
                repl->counters = sparc_cast NULL;
        /* copy entries and counters */