zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject zookeeper git commit: ZOOKEEPER-2890: Local automatic variable is left uninitialized and then freed.
Date Tue, 10 Oct 2017 18:50:46 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/master 194f43e74 -> 43a50ebc6


ZOOKEEPER-2890: Local automatic variable is left uninitialized and then freed.

Fixes https://issues.apache.org/jira/browse/ZOOKEEPER-2890

Author: xoiss <xoiss@ubuntu>

Reviewers: Patrick Hunt <phunt@apache.org>

Closes #359 from xoiss/branch-3.4-bugfix-zookeeper-2890

Change-Id: Ib3d132fc812a62b720967a888aff28edb7f3bdf1
(cherry picked from commit 948766de31eb955d62e661b7c55b74aa64434c77)
Signed-off-by: Patrick Hunt <phunt@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/43a50ebc
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/43a50ebc
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/43a50ebc

Branch: refs/heads/master
Commit: 43a50ebc658dd25b8b9f9f91cf4c32c2c0e3e000
Parents: 194f43e
Author: xoiss <xoiss@ubuntu>
Authored: Tue Oct 10 11:41:21 2017 -0700
Committer: Patrick Hunt <phunt@apache.org>
Committed: Tue Oct 10 11:50:22 2017 -0700

----------------------------------------------------------------------
 src/c/src/zookeeper.c | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/43a50ebc/src/c/src/zookeeper.c
----------------------------------------------------------------------
diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c
index 8c77243..af52572 100644
--- a/src/c/src/zookeeper.c
+++ b/src/c/src/zookeeper.c
@@ -2675,6 +2675,7 @@ static void deserialize_response(zhandle_t *zh, int type, int xid, int
failed, i
             cptr->c.string_result(rc, 0, cptr->data);
         } else {
             struct CreateResponse res;
+            memset(&res, 0, sizeof(res));
             deserialize_CreateResponse(ia, "reply", &res);
             cptr->c.string_result(rc, res.path, cptr->data);
             deallocate_CreateResponse(&res);


Mime
View raw message