diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-23 00:47:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-12-16 02:07:38 +0100 |
| commit | abc4e14cecf651e53861ac47cf1dd8eb7ebe5114 (patch) | |
| tree | e147a01be62f4b9b3703bf670049ffed42f624c4 | |
| parent | f3af8abbf6fef460f7c9224d75d70b17cdf6dead (diff) | |
Fix crash when there is no LD_LIBRARY_PATH
| -rw-r--r-- | src/lib/util.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index a25914a6c..efe39c1c8 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -1125,7 +1125,10 @@ setup_grok_library_path() { static std::string old_path; if (old_path.empty()) { - old_path = getenv("LD_LIRARY_PATH"); + auto const old = getenv("LD_LIRARY_PATH"); + if (old) { + old_path = old; + } } auto const grok = Config::instance()->grok(); if (!grok || grok->binary_location.empty()) { |
