From 641709c03d8dac7e5c583cff9bff4813a2fa7507 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sun, 8 Mar 2026 21:25:05 +0100 Subject: [PATCH] Fix rpcclient.cpp mixed allocation - use pmem_free for prpc_sockpath --- rpcclient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcclient.cpp b/rpcclient.cpp index 249deec..1c6eab7 100644 --- a/rpcclient.cpp +++ b/rpcclient.cpp @@ -13,6 +13,7 @@ #include "pdbg.h" #include "prpc.h" #include "putil.h" +#include "pmem.h" #define POVERLAY_BUFSIZE 512 @@ -188,7 +189,7 @@ int RpcClient::Call(int id, const char *path, char **errm, size_t *errmsz) { char *sockpath = prpc_sockpath(); sockfd = this->connectSocket(sockpath, errm, errmsz); - free(sockpath); + pmem_free(PMEM_SUBSYS_OTHER, sockpath); if (sockfd >= 0) { if ((result = this->writeRequest(sockfd, id, path, errm, errmsz)) == 0) { result = this->readResponse(sockfd, errm, errmsz);