From d996e0297fa31f6302bee7094978ed05cea9af0b Mon Sep 17 00:00:00 2001 From: hzwuhongsong Date: Mon, 6 Nov 2023 10:38:35 +0800 Subject: [PATCH] curvefs/client: fix memory leak of memcached --- curvefs/src/client/kvclient/memcache_client.h | 1 + 1 file changed, 1 insertion(+) diff --git a/curvefs/src/client/kvclient/memcache_client.h b/curvefs/src/client/kvclient/memcache_client.h index 57e82a7f44..d481f5e5e4 100644 --- a/curvefs/src/client/kvclient/memcache_client.h +++ b/curvefs/src/client/kvclient/memcache_client.h @@ -169,6 +169,7 @@ class MemCachedClient : public KVClient { LOG(ERROR) << "Get key = " << key << " error = " << *errorlog << ", get_value_len = " << value_length << ", expect_value_len = " << length; + free(res); memcached_free(tcli); tcli = nullptr; }