diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index c15bd96903c901ea9f0c7dd6aae317926c2b8ac9..f811d2f20316e2aab87cea030ead08613b19d77c 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -637,6 +637,8 @@ int32_t cfgLoadFromEnvVar(SConfig *pConfig) { int32_t code = 0; char **pEnv = environ; line[1023] = 0; + + if (pEnv == NULL) return 0; while (*pEnv != NULL) { name = value = value2 = value3 = NULL; olen = vlen = vlen2 = vlen3 = 0;