Skip to content

Commit

Permalink
Fix bug where address of local variable was returned (#252)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Apr 5, 2024
1 parent 17835ca commit 5938a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/gz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 5938a17

Please sign in to comment.