]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Fix valgrind false positive in ibv_create_comp_channel()
authorTroy Benjegerdes <troy@scl.ameslab.gov>
Mon, 10 Mar 2008 02:39:39 +0000 (19:39 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 10 Mar 2008 02:39:39 +0000 (19:39 -0700)
Need to mark response buffer as defined after write() succeeds.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/verbs.c

index f5cf4d33adafbfc56ef7df617d82eaadc268b4bc..9e370ceed6b896232b221b2d46c4aec31d576ec6 100644 (file)
@@ -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;