Fix ridiculously small memory leak.
[deliverable/binutils-gdb.git] / binutils / objcopy.c
index 9bc1230ef938106b60105aa8037a82dcfc42fdeb..0e17b863d5a7d4b95b1dfbc7aa8d6b683b85d592 100644 (file)
@@ -3087,7 +3087,14 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
 
   if (convert_debugging && dhandle != NULL)
     {
-      if (! write_debugging_info (obfd, dhandle, &symcount, &osympp))
+      bfd_boolean res;
+
+      res = write_debugging_info (obfd, dhandle, &symcount, &osympp);
+
+      free (dhandle);
+      dhandle = NULL; /* Paranoia...  */
+
+      if (! res)
        {
          status = 1;
          return FALSE;
This page took 0.024251 seconds and 4 git commands to generate.