summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorHarpreet Lalwani <hlalwani@redhat.com>2018-10-08 15:58:17 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-10-23 08:03:54 +0000
commit874ce6ef6e33f1493c888760714503ac992b708d (patch)
tree266afb5bb7c4a50a98117d9a6fcf286745b4a56b /rpc
parent4634bb05cc82526e5c55e60746ae5d167f28bea0 (diff)
rpc/rpc-lib: Uninitialized argument value of a function
trav->saved_at.tv_sec is not initialized. Calling "list_empty" function before initializing "trav". Updates: bz#1622665 Change-Id: Ib5c2703a07a9c56ccd115001aca500f7a23c4a2e Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 0a1bcd35d53..9b8e79070ec 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -160,6 +160,9 @@ call_bail(void *data)
}
pthread_mutex_unlock(&conn->lock);
+ if (list_empty(&list))
+ goto out;
+
list_for_each_entry_safe(trav, tmp, &list, list)
{
gf_time_fmt(frame_sent, sizeof frame_sent, trav->saved_at.tv_sec,