[rtems commit] capture: Resolve failure path memory leak.

Jennifer Averett jennifer at rtems.org
Tue Nov 25 18:52:44 UTC 2014


Module:    rtems
Branch:    master
Commit:    0a0ded702a2bcd534cf7b1db8dbcdd4ff1cd9e8f
Changeset: http://git.rtems.org/rtems/commit/?id=0a0ded702a2bcd534cf7b1db8dbcdd4ff1cd9e8f

Author:    Jennifer Averett <jennifer.averett at oarcorp.com>
Date:      Tue Nov 25 12:50:01 2014 -0600

capture: Resolve failure path memory leak.

---

 cpukit/libmisc/capture/capture_support.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/libmisc/capture/capture_support.c b/cpukit/libmisc/capture/capture_support.c
index bdfd37b..a33aa2d 100644
--- a/cpukit/libmisc/capture/capture_support.c
+++ b/cpukit/libmisc/capture/capture_support.c
@@ -154,6 +154,7 @@ rtems_capture_print_trace_records ( int total, bool csv )
         {
           fprintf (stdout, "error: trace read failed: %s\n", rtems_status_text (sc));
           rtems_capture_flush (0);
+          free( per_cpu );
           return;
         }
         /* Release the buffer if there are no records to read */



More information about the vc mailing list