From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE2CBECDE2A for ; Thu, 12 Sep 2019 03:45:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD75B214D8 for ; Thu, 12 Sep 2019 03:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbfILDpC (ORCPT ); Wed, 11 Sep 2019 23:45:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2216 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727873AbfILDpB (ORCPT ); Wed, 11 Sep 2019 23:45:01 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D197F765668A76E5E634; Thu, 12 Sep 2019 11:44:58 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Thu, 12 Sep 2019 11:44:51 +0800 From: Mao Wenan To: , , , CC: , , , , Mao Wenan Subject: [PATCH v2 net 0/3] fix memory leak for sctp_do_bind Date: Thu, 12 Sep 2019 12:02:16 +0800 Message-ID: <20190912040219.67517-1-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <7a450679-40ca-8a84-4cba-7a16f22ea3c0@huawei.com> References: <7a450679-40ca-8a84-4cba-7a16f22ea3c0@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org First two patches are to do cleanup, remove redundant assignment, and change return type of sctp_get_port_local. Third patch is to fix memory leak for sctp_do_bind if failed to bind address. --- v2: add one patch to change return type of sctp_get_port_local. --- Mao Wenan (3): sctp: change return type of sctp_get_port_local sctp: remove redundant assignment when call sctp_get_port_local sctp: destroy bucket if failed to bind addr net/sctp/socket.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) -- 2.20.1