Repository: trafficserver
Updated Branches:
  refs/heads/master 66c66c345 -> 75c24ac3b


TS-3287: Set pointer to NULL after free

Coverity CID #1254796


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/75c24ac3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/75c24ac3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/75c24ac3

Branch: refs/heads/master
Commit: 75c24ac3b485d902f98925b4638196b1edcff30a
Parents: 66c66c3
Author: Phil Sorber <[email protected]>
Authored: Fri Jan 30 19:11:57 2015 -0700
Committer: Phil Sorber <[email protected]>
Committed: Fri Jan 30 19:11:57 2015 -0700

----------------------------------------------------------------------
 proxy/http2/HTTP2.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/75c24ac3/proxy/http2/HTTP2.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index e1d2ab3..920c633 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -673,7 +673,7 @@ REGRESSION_TEST(HPACK_DecodeString)(RegressionTest * t, 
int, int *pstatus)
   TestBox box(t, pstatus);
   box = REGRESSION_TEST_PASSED;
 
-  char* actual;
+  char* actual = NULL;
   uint32_t actual_len;
 
   hpack_huffman_init();
@@ -689,6 +689,7 @@ REGRESSION_TEST(HPACK_DecodeString)(RegressionTest * t, 
int, int *pstatus)
     box.check(len > 0 && memcmp(actual, string_test_case[i].raw_string, 
actual_len) == 0, "decoded string was invalid");
 
     ats_free(actual);
+    actual = NULL;
   }
 }
 

Reply via email to