Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1707775ybe; Wed, 11 Sep 2019 20:47:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIxPUpUOZPiLzSc3xPn0pjp6i40gLA14onnkFlueAqClogNS86/DzCbAb2sXEfE2BOy4G1 X-Received: by 2002:aa7:d59a:: with SMTP id r26mr39903713edq.137.1568260038839; Wed, 11 Sep 2019 20:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568260038; cv=none; d=google.com; s=arc-20160816; b=QRI9kNzYoo6KDGKaJCdsSoQhC5lAlaBp63Ef9WVwj2WziIwxrxtbJaPH2YFobZKVZR TlOepGLJ9suBBtZiK077IZd97dofJ9Evw4PAPWa0U+IRgQ9xOoYE0pdVe2V+jehCC9CI SzTKIPlYpHkwhGkHV1ZWJtKz2CiKgBdTcc9n1hyo2OxKjU37jphOYNO5OK+Q9BiBWrTJ P3PYoXGZ9xTvNsOAQ6nESkUpbS5FtNcYTmGOa0nOHWE3yGLE9v5fooBKTH29kfef14lx 5F9LlCE9YLNVYkYKv3hxK18rTuoGAO7GioChA7RdRAvagX/1mAeirIiSL3dgO9PYqMFg /bBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=u64l1ivwszr1Gj/bvrV2vWx3/BI8C0cTmZsrioGJSrw=; b=qtRd1EsxkzJ4+vRH0Ej93i0qx5bZXLs3tfdn9iHDvFti6E1MjSwavfaw6I7weDDL5h KvdBgiRxFfl01FrqZ8Jo6stfl1igw7hR8uaztwflPwDh5eHvL7nCAhY6NhfddxVZRQm9 OkuCDYlWyWtbE99Y7dkeW/Fsgq8ClGDe7AZ9XCDb+XNkNS7xtp2O9AlAUUFfWxv8LpLG XSS3htXJ3/HbXq0MqodtrNazpa1dE2YpJLrR5cggEqzJlbNfL+jGx/ar0Iz28gWIJiZy 3K93RZuGvSGk9wF9U7cBYFZgUUAtjGxpXgqgXVEy0YjiAMFWGHm67bi/Jj76yW75+SkP FnTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si2831926edq.137.2019.09.11.20.46.54; Wed, 11 Sep 2019 20:47:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729740AbfILDpC (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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