From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id A1A6D5A86 for ; Tue, 17 Mar 2015 22:35:20 +0100 (CET) Received: by wgdm6 with SMTP id m6so19310509wgd.2 for ; Tue, 17 Mar 2015 14:35:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=5OUAE1hGpCZTUaBg4Ap1mmyfc9NlJDyuebCqxzz07QQ=; b=YSOl01snj0RO4t94vdoiAFvkzjIE2eX9AVV5ikUpxEDcBT1rsmMmIpmp4NuPzYc1Gb er7bzidZ7hV6z88nYJXr61D3olrCkMjnaRZY58J6AI/o0WIwQNy+aIMWaZnib+11Cxb/ NqVcQ7WchLNxUCD0JMNoBSboHa74QuPmBRolhdQzjX/O4Fl09/o7yAHNio60EUYKIKhm 2X7RgZRdw9osuABeffX3Xe8qCc2cPZPprcl+KPRY4NbsKypyB3Y8tPkfFuhZgWp+imq8 6MYX4AHHv4AL2OeI3r/w2ZiPp95bJNL5463lciKAJXNRhpSecFw/YtP+tHEIrLM0xIRU 4XOA== X-Gm-Message-State: ALoCoQko5yVQp58cKyCenKkoO95t7/FxUF89AJqLeWKmoBMwXh8o5dw7kQMVmY63HyF3wsQOszo9 X-Received: by 10.180.90.166 with SMTP id bx6mr1134317wib.65.1426628120455; Tue, 17 Mar 2015 14:35:20 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id kr5sm21630134wjc.1.2015.03.17.14.35.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 14:35:18 -0700 (PDT) From: Thomas Monjalon To: changchun.ouyang@intel.com Date: Tue, 17 Mar 2015 22:34:44 +0100 Message-ID: <1729896.h2YfPhv0FY@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <20150312170919.GA19053@tuxdriver.com> References: <1425958188-25041-1-git-send-email-changchun.ouyang@intel.com> <20150312133846.GA15260@hmsreliant.think-freely.org> <20150312170919.GA19053@tuxdriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v7] af_packet: Fix some klocwork errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2015 21:35:20 -0000 > > > > Fix possible memory leak issue: free kvlist before return; > > > > Fix possible resource lost issue: close qssockfd before return; > > > > > > > > Signed-off-by: Changchun Ouyang > > > > --- > > > > Change in v7: > > > > - Remove unnecessary '!= NULL' check before freeing it; > > > > > > > > Change in v6: > > > > - Refine exit point; > > > > > > > > Change in v5: > > > > - Initialize qsockfd with -1; > > > > > > > > Change in v4: > > > > - Check sockfd in internals->rx_queue against 0; > > > > > > > > Change in v3: > > > > - Also close sockets for all queues; > > > > > > > > Change in v2: > > > > - Make the error exit point a common path. > > > > > > Acked-by: Michael Qiu > > Acked-by: Neil Horman > > Acked-by: John W. Linville Applied, thanks