From: Steven Date: Fri, 27 Oct 2017 16:34:57 +0000 (-0700) Subject: LDPRELOAD: Fix out-of-scope variable coverity error X-Git-Tag: v18.04-rc0~388 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F9086%2F2;p=vpp.git LDPRELOAD: Fix out-of-scope variable coverity error >>> CID 178271: Memory - illegal accesses (RETURN_LOCAL) >>> Using "ep", which points to an out-of-scope variable "_ep". Change-Id: Icf21e602bc2718bfedd9480e9da41aff8693048e Signed-off-by: Steven --- diff --git a/src/vcl/vcom_socket.c b/src/vcl/vcom_socket.c index 5918f6b73d1..afcdc9548e2 100644 --- a/src/vcl/vcom_socket.c +++ b/src/vcl/vcom_socket.c @@ -1513,11 +1513,10 @@ vcom_session_sendto (int __sid, void *__buf, size_t __n, socklen_t __addr_len) { vppcom_endpt_t *ep = 0; + vppcom_endpt_t _ep; if (__addr) { - vppcom_endpt_t _ep; - ep = &_ep; ep->vrf = VPPCOM_VRF_DEFAULT; switch (__addr->sa_family)