diff --git a/src/posix/platform/settings.cpp b/src/posix/platform/settings.cpp index 3b4c2fd56..8ef12ffab 100644 --- a/src/posix/platform/settings.cpp +++ b/src/posix/platform/settings.cpp @@ -232,6 +232,7 @@ void otPlatSettingsDeinit(otInstance *aInstance) VerifyOrExit(sSettingsFd != -1); VerifyOrDie(close(sSettingsFd) == 0, OT_EXIT_ERROR_ERRNO); + sSettingsFd = -1; exit: return;