diff --git a/services/param/adapter/param_persistadp.c b/services/param/adapter/param_persistadp.c index ad26c31782f63e06e3332004f5f8bd31c199d058..7e869de365b01a1b88624b238c208939460f9143 100644 --- a/services/param/adapter/param_persistadp.c +++ b/services/param/adapter/param_persistadp.c @@ -108,6 +108,8 @@ static void BatchSavePersistParamEnd(PERSIST_SAVE_HANDLE handle) { int ret; FILE *fp = (FILE *)handle; + (void)fflush(fp); + (void)fsync(fileno(fp)); (void)fclose(fp); if (InUpdaterMode() == 0) { unlink(PARAM_PERSIST_SAVE_PATH);