From f5ce7549bef764c0d87bbde3de53f85cfaea9336 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 23 Feb 2016 09:50:40 +0100 Subject: [PATCH] unix-manager: fix memleak in error case (CID 1353491) --- src/unix-manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix-manager.c b/src/unix-manager.c index 29fe4b8a60..a7f0052e23 100644 --- a/src/unix-manager.c +++ b/src/unix-manager.c @@ -396,6 +396,8 @@ int UnixCommandAccept(UnixCommand *this) uclient = UnixClientAlloc(); if (unlikely(uclient == NULL)) { SCLogError(SC_ERR_MEM_ALLOC, "Can't allocate new client"); + json_decref(server_msg); + close(client); return 0; } uclient->fd = client; -- 2.47.3