libselinux: set errno on label lookup failure
selabel_lookup(3) is expected to set errno on lookup failure, i.e. when it returns NULL. Set errno if a regular expression failed to compile in compile_regex(). Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
168edd1ca2
commit
6df403d597
|
@ -407,6 +407,7 @@ static inline int compile_regex(struct spec *spec, const char **errbuf)
|
|||
*errbuf = ®ex_error_format_buffer[0];
|
||||
}
|
||||
__pthread_mutex_unlock(&spec->regex_lock);
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue