From 176b9f67b014b392507bc63735b76397d5daff00 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 4 Apr 2024 14:03:04 -0500 Subject: [PATCH] Fix bug where address of local variable was returned Signed-off-by: Addisu Z. Taddese --- src/cmd/gz.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gz.cc b/src/cmd/gz.cc index cdd559c7..25109c9e 100644 --- a/src/cmd/gz.cc +++ b/src/cmd/gz.cc @@ -33,7 +33,7 @@ extern "C" char *gzVersion() extern "C" const char *configPath() { std::string configPath = gz::launch::getPluginInstallPath(); - return configPath.c_str(); + return strdup(configPath.c_str()); } //////////////////////////////////////////////////