From 5be0f95443d4816811bfaea2b05258e7b0528064 Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Fri, 10 Feb 2023 14:03:45 -0500 Subject: [PATCH] Update elfio.hpp Fix a memory leak that misuses unique_ptr --- elfio/elfio.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elfio/elfio.hpp b/elfio/elfio.hpp index 343b41b..2e5e3e8 100644 --- a/elfio/elfio.hpp +++ b/elfio/elfio.hpp @@ -149,7 +149,7 @@ class elfio bool ret = load( *pstream, is_lazy ); if ( !is_lazy ) { - pstream.release(); + pstream.reset(); } return ret;