Skip to content
Snippets Groups Projects
Commit c8e0ecca authored by Moe Jette's avatar Moe Jette
Browse files

fix bug if no licenses configured and job asks for a license

parent 692da4ea
No related branches found
No related tags found
No related merge requests found
......@@ -244,8 +244,11 @@ extern List license_job_validate(char *licenses, bool *valid)
if (iter == NULL)
fatal("malloc failure from list_iterator_create");
while ((license_entry = (licenses_t *) list_next(iter))) {
match = list_find_first(license_list, _license_find_rec,
license_entry->name);
if (license_list) {
match = list_find_first(license_list,
_license_find_rec, license_entry->name);
} else
match = NULL;
if (!match) {
debug("could not find license %s for job",
license_entry->name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment