trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [trafficserver] 02/02: TS-4794: Fix memory leak in test_P_Net.cc
Date Sat, 03 Sep 2016 22:14:06 GMT
This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 4adcfae47a4a575157c8845c8da906ed4bf94d15
Author: Bryon Gloden, CISSPĀ® <cissp@bryongloden.com>
AuthorDate: Thu Aug 11 18:59:36 2016 -0400

    TS-4794: Fix memory leak in test_P_Net.cc
    
    This closes #855.
---
 iocore/net/test_P_Net.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/iocore/net/test_P_Net.cc b/iocore/net/test_P_Net.cc
index 5bf9c68..6cbfaf5 100644
--- a/iocore/net/test_P_Net.cc
+++ b/iocore/net/test_P_Net.cc
@@ -45,7 +45,7 @@ struct NetTesterSM : public Continuation {
   handle_read(int event, void *data)
   {
     int r;
-    char *str;
+    char *str = NULL;
     switch (event) {
     case VC_EVENT_READ_READY:
       r   = reader->read_avail();
@@ -68,6 +68,7 @@ struct NetTesterSM : public Continuation {
     default:
       ink_release_assert(!"unknown event");
     }
+    delete[] str;
     return EVENT_CONT;
   }
 };

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.

Mime
View raw message