Don't use bfd_get_* macro to set bfd fields
[deliverable/binutils-gdb.git] / bfd / doc / chew.c
index 71c7e2dc887632f8fc6a8a2a7628d8a6683c4ecc..ef5a22c2fa57f2cd794e512a96aedcd797cf361e 100644 (file)
@@ -1,5 +1,5 @@
 /* chew
-   Copyright (C) 1990-2016 Free Software Foundation, Inc.
+   Copyright (C) 1990-2019 Free Software Foundation, Inc.
    Contributed by steve chamberlain @cygnus
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1260,11 +1260,11 @@ free_words (void)
       if (ptr->code)
        {
          int i;
-         for (i = 0; i < ptr->code_length; i ++)
+         for (i = 0; i < ptr->code_end - 1; i ++)
            if (ptr->code[i] == push_text
                && ptr->code[i + 1])
              {
-               free (ptr->code[i + 1] - 1);
+               free ((char *) ptr->code[i + 1] - 1);
                ++ i;
              }
          free (ptr->code);
@@ -1602,6 +1602,7 @@ main (ac, av)
              read_in (&b, f);
              compile (b.ptr);
              perform ();
+             delete_string (&b);
            }
          else if (av[i][1] == 'i')
            {
This page took 0.026979 seconds and 4 git commands to generate.