From d127c3b073158aa6fb278d0cb7708e61e9378aab Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:20:40 +0900 Subject: [PATCH] examples/lte_hibernation_wake_socket: Fix leak of closing socket descriptor Fix leak of closing socket descriptor. Detected by CodeSonar 712248 --- .../lte_hibernation_wake_socket_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/lte_hibernation_wake_socket/lte_hibernation_wake_socket_main.c b/examples/lte_hibernation_wake_socket/lte_hibernation_wake_socket_main.c index c55af332f..9d2390a5b 100644 --- a/examples/lte_hibernation_wake_socket/lte_hibernation_wake_socket_main.c +++ b/examples/lte_hibernation_wake_socket/lte_hibernation_wake_socket_main.c @@ -240,6 +240,7 @@ static int load_sock_context(FAR char *filename) if (ret < 0) { printf("SIOCSETCONTEXT failed:%d\n", errno); + close(sockfd); return -1; }