From 186c7a2de85adc61cd7d2ae6b83d51ee21616fd1 Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Thu, 28 May 2020 19:37:21 -0400 Subject: [PATCH] add missing free for dynamic memory allocated --- search/binary_search.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/search/binary_search.cpp b/search/binary_search.cpp index 9933c9816..d8a3a6631 100644 --- a/search/binary_search.cpp +++ b/search/binary_search.cpp @@ -30,5 +30,7 @@ int main(int argc, char const* argv[]) { std::cout << key << " found at index " << res << std::endl; else std::cout << key << " not found" << std::endl; + + delete[] a; return 0; }