Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 36E7C200B65 for ; Wed, 3 Aug 2016 07:01:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 35768160AA8; Wed, 3 Aug 2016 05:01:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A07A6160A76 for ; Wed, 3 Aug 2016 07:01:21 +0200 (CEST) Received: (qmail 95912 invoked by uid 500); 3 Aug 2016 05:01:20 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 95897 invoked by uid 99); 3 Aug 2016 05:01:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 05:01:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 67F7E2C0059 for ; Wed, 3 Aug 2016 05:01:20 +0000 (UTC) Date: Wed, 3 Aug 2016 05:01:20 +0000 (UTC) From: "Michael Han (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ZOOKEEPER-2498) Potential resource leak in C client when processing unexpected / out of order response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Aug 2016 05:01:22 -0000 Michael Han created ZOOKEEPER-2498: -------------------------------------- Summary: Potential resource leak in C client when processing unexpected / out of order response Key: ZOOKEEPER-2498 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2498 Project: ZooKeeper Issue Type: Bug Components: c client Affects Versions: 3.5.2, 3.4.8 Reporter: Michael Han Assignee: Michael Han Fix For: 3.4.9, 3.5.3 In C client, we use reference counting to decide if a given zh handle can be destroyed or not. This requires we always make sure to call api_prolog (which increment the counter) and api_epilog (which decrease the counter) in pairs, for a given call context. In zookeeper_process, there is a place where the code will return without invoking api_epilog, which would lead to potential zh resource leak. -- This message was sent by Atlassian JIRA (v6.3.4#6332)