aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTroy Benjegerdes <troy@scl.ameslab.gov>2008-03-09 19:39:39 -0700
committerRoland Dreier <rolandd@cisco.com>2008-03-09 19:39:39 -0700
commitc8d39e325e380154476d4d24bf31f21fb0c222dc (patch)
tree193f7f7fbc7b3fdfdfaca3355567ebffd324d143
parent744fbf333e8641306ce4890ea84a04ffe41433a0 (diff)
downloadlibibverbs-c8d39e325e380154476d4d24bf31f21fb0c222dc.tar.gz
Fix valgrind false positive in ibv_create_comp_channel()
Need to mark response buffer as defined after write() succeeds. Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--src/verbs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/verbs.c b/src/verbs.c
index f5cf4d3..9e370ce 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -226,6 +226,8 @@ struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context)
return NULL;
}
+ VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
+
channel->context = context;
channel->fd = resp.fd;
channel->refcnt = 0;