summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcom_socket.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-10-27 09:34:57 -0700
committerChris Luke <chris_luke@comcast.com>2017-10-27 17:44:25 +0000
commit8aa0d786a97eda2761c334330d71328919d4c674 (patch)
tree0646f393f5220f21e4cec3c3466a5c9af9960577 /src/vcl/vcom_socket.c
parent58c947650cb864c592779530a655ea108b960b1a (diff)
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 <sluong@cisco.com>
Diffstat (limited to 'src/vcl/vcom_socket.c')
-rw-r--r--src/vcl/vcom_socket.c3
1 files changed, 1 insertions, 2 deletions
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)