+2020-07-22  Nick Clifton  <nickc@redhat.com>
+
+       * readelf.c (parse_args): Silence potential warnings about a
+       memory resource leak when allocating space for ctf option values.
+       (dump_section_as_ctf): Fix typo checking dump_ctf_strtab_name
+       variable.
+
 2020-07-21  Nick Clifton  <nickc@redhat.com>
 
        * po/sv.po: Updated Swedish translation.
 
          request_dump (dumpdata, CTF_DUMP);
          break;
        case OPTION_CTF_SYMBOLS:
+         free (dump_ctf_symtab_name);
          dump_ctf_symtab_name = strdup (optarg);
          break;
        case OPTION_CTF_STRINGS:
+         free (dump_ctf_strtab_name);
          dump_ctf_strtab_name = strdup (optarg);
          break;
        case OPTION_CTF_PARENT:
+         free (dump_ctf_parent_name);
          dump_ctf_parent_name = strdup (optarg);
          break;
        case OPTION_DYN_SYMS:
       symsectp = shdr_to_ctf_sect (&symsect, symtab_sec, filedata);
       symsect.cts_data = symdata;
     }
-  if (dump_ctf_strtab_name && dump_ctf_symtab_name[0] != 0)
+  if (dump_ctf_strtab_name && dump_ctf_strtab_name[0] != 0)
     {
       if ((strtab_sec = find_section (filedata, dump_ctf_strtab_name)) == NULL)
        {
 
+2020-07-22  Nick Clifton  <nickc@redhat.com>
+
+       * ctf-archive.c (ctf_arc_write): Avoid calling close twice on the
+       same file descriptor.
+
 2020-07-04  Nick Clifton  <nickc@redhat.com>
 
        Binutils 2.35 branch created.
 
 
   err = ctf_arc_write_fd (fd, ctf_files, ctf_file_cnt, names, threshold);
   if (err)
-    goto err;
+    goto err_close;
 
   if ((err = close (fd)) < 0)
-    {
-      ctf_dprintf ("ctf_arc_write(): Cannot close after writing to archive: "
-                  "%s\n", strerror (errno));
-      goto err_close;
-    }
-
- err:
-  close (fd);
-  if (err < 0)
-    unlink (file);
-
-  return err;
+    ctf_dprintf ("ctf_arc_write(): Cannot close after writing to archive: "
+                "%s\n", strerror (errno));
+  goto err;
 
  err_close:
+  (void) close (fd);
+ err:
   if (err < 0)
     unlink (file);