Failure in startup - modified to handle memory exhaustion when loading file
This commit is contained in:
parent
b714eff077
commit
728c97ab6d
2 changed files with 14 additions and 6 deletions
|
|
@ -641,9 +641,6 @@ main(int argc,
|
|||
/* Copy original running to tmp as backup (restore if error) */
|
||||
if (xmldb_copy(h, "running", "tmp") < 0)
|
||||
goto done;
|
||||
/* [Delete and] create running db */
|
||||
if (startup_db_reset(h, "running") < 0)
|
||||
goto done;
|
||||
ret = startup_mode_startup(h, "tmp", cbret);
|
||||
/* If ret fails, copy tmp back to running */
|
||||
if (ret != 1)
|
||||
|
|
@ -656,9 +653,6 @@ main(int argc,
|
|||
/* Copy original running to tmp as backup (restore if error) */
|
||||
if (xmldb_copy(h, "running", "tmp") < 0)
|
||||
goto done;
|
||||
/* [Delete and] create running db */
|
||||
if (startup_db_reset(h, "running") < 0)
|
||||
goto done;
|
||||
/* Load and commit from startup */
|
||||
ret = startup_mode_startup(h, "startup", cbret);
|
||||
/* If ret fails, copy tmp back to running */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue