You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2022/08/10 17:32:56 UTC

[trafficserver] branch 9.2.x updated: test_MMH: fix memory leak in unit test (#8357)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
     new e52183836 test_MMH: fix memory leak in unit test (#8357)
e52183836 is described below

commit e52183836d0c1a44e9a0d6d681cbef9df3afb549
Author: Brian Olsen <bn...@gmail.com>
AuthorDate: Mon Sep 27 17:09:52 2021 -0600

    test_MMH: fix memory leak in unit test (#8357)
    
    (cherry picked from commit 0eccef045022c3b6c7ca185528465882997cce96)
---
 src/tscore/unit_tests/test_MMH.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/tscore/unit_tests/test_MMH.cc b/src/tscore/unit_tests/test_MMH.cc
index b56490062..43bc1643b 100644
--- a/src/tscore/unit_tests/test_MMH.cc
+++ b/src/tscore/unit_tests/test_MMH.cc
@@ -85,6 +85,9 @@ TEST_CASE("MMH", "[libts][MMH]")
       printf("********** collision %d\n", xy);
   }
 
+  ats_free(xf);
+  ats_free(xxh);
+
   unsigned char *s       = (unsigned char *)MMH_x;
   int l                  = sizeof(MMH_x);
   unsigned char *s1      = (unsigned char *)ats_malloc(l + sizeof(uint32_t));