From 9f22c878e89ff91481c26f73539d03e42b44d08c Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Mon, 8 Dec 2014 14:49:16 +0100 Subject: [PATCH] unix-manager: fix cppcheck errors This patch fixes the following errors: [src/unix-manager.c:306]: (error) Memory pointed to by 'client' is freed twice. [src/unix-manager.c:313]: (error) Memory pointed to by 'client' is freed twice. [src/unix-manager.c:323]: (error) Memory pointed to by 'client' is freed twice. [src/unix-manager.c:334]: (error) Memory pointed to by 'client' is freed twice. Unix manager was treating the packet after closing the socket if message was too long. --- src/unix-manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix-manager.c b/src/unix-manager.c index 2d0a90641a..d28a7dac1d 100644 --- a/src/unix-manager.c +++ b/src/unix-manager.c @@ -297,6 +297,7 @@ int UnixCommandAccept(UnixCommand *this) SCLogInfo("Command server: client message is too long, " "disconnect him."); close(client); + return 0; } buffer[ret] = 0; -- 2.47.3