fix cleanup handling in m32r_load
authorTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:05:32 +0000 (17:05 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:05:32 +0000 (17:05 +0000)
m32r_load is missing a call to do_cleanups along one return path.

* m32r-rom.c (m32r_load): Call do_cleanups at all returns.

gdb/ChangeLog
gdb/m32r-rom.c

index 53a3eb7..fc3829a 100644 (file)
@@ -1,5 +1,9 @@
 2013-05-30  Tom Tromey  <tromey@redhat.com>
 
+       * m32r-rom.c (m32r_load): Call do_cleanups at all returns.
+
+2013-05-30  Tom Tromey  <tromey@redhat.com>
+
        * mi/mi-main.c (list_available_thread_groups): Call do_cleanups.
 
 2013-05-30  Tom Tromey  <tromey@redhat.com>
index aab59f0..5b27b60 100644 (file)
@@ -167,6 +167,7 @@ m32r_load (char *filename, int from_tty)
   if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL)))
     {
       monitor_printf ("q\n");
+      do_cleanups (cleanup);
       return;
     }
 #endif