Error: RESOURCE_LEAK (CWE-772):
rsyslog-7.4.10/plugins/imudp/imudp.c:260: alloc_fn: Storage is returned from allocation function "malloc(size_t)".
rsyslog-7.4.10/plugins/imudp/imudp.c:260: var_assign: Assigning: "newlcnfinfo" = storage returned from "malloc(56UL)".
rsyslog-7.4.10/plugins/imudp/imudp.c:307: leaked_storage: Variable "newlcnfinfo" going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
rsyslog-7.4.10/plugins/imptcp/imptcp.c:1252: open_arg: "AcceptConnReq(ptcplstn_t *, int *, prop_t **, prop_t **)" opens handle stored into "newSock".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:615:2: open_fn: Returning handle opened by function "accept(int, __SOCKADDR_ARG, socklen_t * restrict)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:615:2: var_assign: Assigning: "iNewSock" = "accept(pLstn->sock, __SOCKADDR_ARG({ .__sockaddr__ = (struct sockaddr *)&addr}), &addrlen)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:623:3: noescape: Resource "iNewSock" is not freed or pointed-to in function "EnableKeepAlive(ptcplstn_t *, int)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:535:40: noescape: "EnableKeepAlive(ptcplstn_t *, int)" does not free or save its handle parameter "sock".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:629:2: noescape: Resource "iNewSock" is not freed or pointed-to in function "fcntl(int, int, ...)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:634:3: noescape: Resource "iNewSock" is not freed or pointed-to in function "fcntl(int, int, ...)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:641:2: var_assign: Assigning: "*newSock" = "iNewSock".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:1260: leaked_handle: Handle variable "newSock" going out of scope leaks the handle.
Error: RESOURCE_LEAK (CWE-772):
rsyslog-7.4.10/plugins/imptcp/imptcp.c:1120: alloc_fn: Storage is returned from allocation function "malloc(size_t)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:1120: var_assign: Assigning: "pSrv" = storage returned from "malloc(136UL)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:1159: leaked_storage: Variable "pSrv" going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
rsyslog-7.4.10/plugins/imptcp/imptcp.c:964: alloc_fn: Storage is returned from allocation function "malloc(size_t)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:964: var_assign: Assigning: "pSess" = storage returned from "malloc(88UL)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:987: leaked_storage: Variable "pSess" going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
rsyslog-7.4.10/plugins/imptcp/imptcp.c:925: alloc_fn: Storage is returned from allocation function "malloc(size_t)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:925: var_assign: Assigning: "pLstn" = storage returned from "malloc(56UL)".
rsyslog-7.4.10/plugins/imptcp/imptcp.c:951: leaked_storage: Variable "pLstn" going out of scope leaks the storage it points to.
it's cosmetic, because it happens only during shutdown, so the OS
clean up a microsecond later in any case. But good to solve this
for valgrind AND future extensions.