diff options
author | Sander Vrijders <[email protected]> | 2017-03-30 11:34:19 +0000 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-03-30 11:34:19 +0000 |
commit | bce97d70ce43290f8351f34c763b30bfd73e6b99 (patch) | |
tree | dc7dee2b2ea4e2f4720e113d18ba198d2cda20bb /src/lib/cdap.c | |
parent | 19d90d59b5b3c76bb9c67e6a78ff286f3529c6ee (diff) | |
parent | 4ac9e1dc24c0799568d28b48fa1d869e5fd2c563 (diff) | |
download | ouroboros-bce97d70ce43290f8351f34c763b30bfd73e6b99.tar.gz ouroboros-bce97d70ce43290f8351f34c763b30bfd73e6b99.zip |
Merged in sandervrijders/ouroboros/be-valgrind (pull request #438)
Be valgrind
Diffstat (limited to 'src/lib/cdap.c')
-rw-r--r-- | src/lib/cdap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/cdap.c b/src/lib/cdap.c index 54a5b262..38806c23 100644 --- a/src/lib/cdap.c +++ b/src/lib/cdap.c @@ -703,6 +703,7 @@ int cdap_reply_wait(struct cdap * instance, { int ret; struct cdap_req * r; + invoke_id_t iid; if (instance == NULL || (data != NULL && len == NULL)) return -EINVAL; @@ -711,10 +712,12 @@ int cdap_reply_wait(struct cdap * instance, if (r == NULL) return -EINVAL; + iid = r->iid; + ret = cdap_req_wait(r); if (ret < 0) { cdap_sent_del(instance, r); - release_id(instance, r->iid); + release_id(instance, iid); return ret; } @@ -727,8 +730,8 @@ int cdap_reply_wait(struct cdap * instance, ret = r->response; - release_id(instance, r->iid); cdap_sent_del(instance, r); + release_id(instance, iid); return ret; } |