loadpolicy: only close polFd if it is valid
PATCH 1/1 loadpolicy: only close polFd if it is valid
It can be -1 at this point.
CID 1055562
Signed-off-by Ian Campbell <[email protected]>
--- tools/flask/utils/loadpolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/flask/utils/loadpolicy.c +1 -1
@@ -115,7 +115,7 @@ done:if ( ret <0 )fprintf (stderr,"Unable to unmap policy memory: %s\n" ,strerror (errno)); } -if ( polFd ) +if ( polFd >=0 )close (polFd);if ( xch )xc_interface_close (xch);
Signature · 1 line
2.1.4
Quoted 4 lines · Ian Campbell
It can be -1 at this point.
CID 1055562
Signed-off-by Ian Campbell <[email protected]>
Acked-by Wei Liu <[email protected]>
Quoted 20 lines
--- tools/flask/utils/loadpolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/flask/utils/loadpolicy.c +1
-1@@ -115,7 +115,7 @@ done:if ( ret <0 )fprintf (stderr,"Unable to unmap policy memory: %s\n" ,strerror (errno)); } -if ( polFd ) +if ( polFd >=0 )close (polFd);if ( xch )xc_interface_close (xch);Signature · 1 line
2.1.4
Quoted 7 lines · Wei Liu
Quoted 4 lines · Ian Campbell
It can be -1 at this point.
CID 1055562
Signed-off-by Ian Campbell <[email protected]>Acked-by Wei Liu <[email protected]>
Ian, will you commit this one?
Konrad Rzeszutek Wilk
AppliedQuoted 10 lines · Ian Campbell
Quoted 7 lines · Wei Liu
Quoted 4 lines · Ian Campbell
It can be -1 at this point.
CID 1055562
Signed-off-by Ian Campbell <[email protected]>Acked-by Wei Liu <[email protected]>Ian, will you commit this one?
Applied.
Quoted 6 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel