diff --git a/orchagent/mirrororch.cpp b/orchagent/mirrororch.cpp index bfd53636fc16..4c0380f1d3ee 100644 --- a/orchagent/mirrororch.cpp +++ b/orchagent/mirrororch.cpp @@ -194,7 +194,8 @@ void MirrorOrch::createEntry(const string& key, const vector& d { SWSS_LOG_ENTER(); - MirrorEntry entry(getenv("platform")); + string platform = getenv("platform") ? getenv("platform") : ""; + MirrorEntry entry(platform); for (auto i : data) {