Fix memory leak.
authorNick Clifton <nickc@redhat.com>
Thu, 2 Sep 1999 17:56:51 +0000 (17:56 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 2 Sep 1999 17:56:51 +0000 (17:56 +0000)
bfd/ChangeLog
bfd/elflink.h

index 26931c2f37c8efc242de03d3ac6899b906ee9643..c23850f53a834453ce81da6764104c1765be89cf 100644 (file)
@@ -1,3 +1,7 @@
+1999-09-02  Nick Clifton  <nickc@cygnus.com>
+
+       * elflink.h (elf_gc_record_vtentry): Fix memory leak.
+
 Wed Sep  1 13:34:29 1999  Jeffrey A Law  (law@cygnus.com)
 
        * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
index be38fb9d27dca389edfbb51883649eea86fc065e..35bf885d82cc21c931a3198be4177597ef885290 100644 (file)
@@ -6403,7 +6403,7 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
            return false;
 
          oldbytes = (h->vtable_entries_size/FILE_ALIGN + 1) * sizeof(boolean);
-         memset (ptr + oldbytes, 0, bytes - oldbytes);
+         memset (((char *)ptr) + oldbytes, 0, bytes - oldbytes);
        }
       else
        {