On Fri, 2017-05-12 at 22:13 +0200, Nicolas Iooss wrote: > selabel_subs_init() returned without closing cfg when a call to > fstat() > failed. Fix this. > > Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx> Thanks, applied both patches. > --- > libselinux/src/label.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libselinux/src/label.c b/libselinux/src/label.c > index 0e43474c352e..71a273bdeb2a 100644 > --- a/libselinux/src/label.c > +++ b/libselinux/src/label.c > @@ -104,7 +104,7 @@ struct selabel_sub *selabel_subs_init(const char > *path, > return list; > > if (fstat(fileno(cfg), &sb) < 0) > - return list; > + goto out; > > while (fgets_unlocked(buf, sizeof(buf) - 1, cfg)) { > char *ptr = NULL;