refuse to add jobs for names that are not loaded

This commit is contained in:
Lennart Poettering 2010-01-20 19:20:41 +01:00
parent 1e198baf11
commit 21b293e813

View file

@ -511,6 +511,9 @@ static int transaction_add_job_and_dependencies(Manager *m, JobType type, Name *
assert(type < _JOB_TYPE_MAX);
assert(name);
if (name->meta.state != NAME_LOADED)
return -EINVAL;
/* First add the job. */
if (!(ret = transaction_add_one_job(m, type, name, &is_new)))
return -ENOMEM;