Fixing process crash in case of module load error.

This is related to #330 issue on GitHub.
This commit is contained in:
Max Romanov
2019-10-22 16:14:02 +03:00
parent 8df4468014
commit 2dbfd7c35e

View File

@@ -327,6 +327,9 @@ nxt_app_start(nxt_task_t *task, void *data)
lang->version, lang->file); lang->version, lang->file);
nxt_app = nxt_app_module_load(task, lang->file); nxt_app = nxt_app_module_load(task, lang->file);
if (nxt_slow_path(nxt_app == NULL)) {
return NXT_ERROR;
}
} }
if (nxt_app->pre_init != NULL) { if (nxt_app->pre_init != NULL) {