-
Committer:
Steve Beattie
-
Date:
2016-03-19 08:51:00 UTC
-
Revision ID:
sbeattie@ubuntu.com-20160319085100-o6u4vpq2rl1pelnl
Subject: libapparmor: don't close invalid fd
It's possible to end up unreferencing a kernel_interface object that
has ->dirfd set to -1. This patch avoids calling close(2) on that fd.
(close(-1) will just return EBADF anyway.)
Coverity CIDs #55996 and #55997
Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Tyler Hicks <tyhicks@canonical.com>