trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [trafficserver] branch master updated: Fixes memory leak in traffic_crashlog
Date Sat, 20 Jul 2019 02:08:33 GMT
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new ca34ccc  Fixes memory leak in traffic_crashlog
ca34ccc is described below

commit ca34cccd4350a3ad9b0e60f682cef95b232257cb
Author: Randall Meyer <rrm@apache.org>
AuthorDate: Mon Jul 15 09:25:08 2019 -0700

    Fixes memory leak in traffic_crashlog
    
    Closes issue #5708
---
 src/traffic_crashlog/traffic_crashlog.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/traffic_crashlog/traffic_crashlog.cc b/src/traffic_crashlog/traffic_crashlog.cc
index 42aff7a..603f109 100644
--- a/src/traffic_crashlog/traffic_crashlog.cc
+++ b/src/traffic_crashlog/traffic_crashlog.cc
@@ -228,6 +228,7 @@ main(int /* argc ATS_UNUSED */, const char **argv)
   fp = debug_mode ? stdout : crashlog_open(logname);
   if (fp == nullptr) {
     Error("failed to create '%s': %s", logname, strerror(errno));
+    ats_free(logname);
     return 1;
   }
 
@@ -262,6 +263,8 @@ main(int /* argc ATS_UNUSED */, const char **argv)
 
   Error("wrote crash log to %s", logname);
 
+  ats_free(logname);
+
   fflush(fp);
   fclose(fp);
   return 0;


Mime
View raw message