From 140051cc9ad92c90d59b432ece9d8d57f0b8f709 Mon Sep 17 00:00:00 2001 From: Marc Waldman <54793456+marcrepo@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:38:15 -0500 Subject: [PATCH 1/2] Removed word "file" from description (see Issue 2623) This pull request is in reference to Issue #2623 - "DescriptorNeverClosed.ql identifies only sockets (not file handles)" --- cpp/ql/src/Critical/DescriptorNeverClosed.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Critical/DescriptorNeverClosed.ql b/cpp/ql/src/Critical/DescriptorNeverClosed.ql index f06708f4ae36..ae50e6256020 100644 --- a/cpp/ql/src/Critical/DescriptorNeverClosed.ql +++ b/cpp/ql/src/Critical/DescriptorNeverClosed.ql @@ -1,6 +1,6 @@ /** * @name Open descriptor never closed - * @description Functions that always return before closing the socket or file they opened leak resources. + * @description Functions that always return before closing the socket they opened leak resources. * @kind problem * @id cpp/descriptor-never-closed * @problem.severity warning From 0d409b2d69dd0ce70f339223352ca3baf1a5f9ff Mon Sep 17 00:00:00 2001 From: Marc Waldman <54793456+marcrepo@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:46:10 -0500 Subject: [PATCH 2/2] Documentation update for Issue #2623 Changes based on Issue #2623 - DescriptorNeverClosed.ql identifies only sockets (not file handles) --- cpp/ql/src/Critical/DescriptorNeverClosed.qhelp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/src/Critical/DescriptorNeverClosed.qhelp b/cpp/ql/src/Critical/DescriptorNeverClosed.qhelp index 1a14f7981dd2..a63c85f3399a 100644 --- a/cpp/ql/src/Critical/DescriptorNeverClosed.qhelp +++ b/cpp/ql/src/Critical/DescriptorNeverClosed.qhelp @@ -6,7 +6,7 @@

-This rule finds calls to open or socket where there is no corresponding close call in the program analyzed. +This rule finds calls to socket where there is no corresponding close call in the program analyzed. Leaving descriptors open will cause a resource leak that will persist even after the program terminates.

@@ -14,7 +14,7 @@ Leaving descriptors open will cause a resource leak that will persist even after
-

Ensure that all file or socket descriptors allocated by the program are freed before it terminates.

+

Ensure that all socket descriptors allocated by the program are freed before it terminates.