From patchwork Wed Oct 12 09:35:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gaoxingwang X-Patchwork-Id: 13004914 X-Patchwork-Delegate: stephen@networkplumber.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF5F0C433FE for ; Wed, 12 Oct 2022 09:35:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230011AbiJLJfT (ORCPT ); Wed, 12 Oct 2022 05:35:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbiJLJfR (ORCPT ); Wed, 12 Oct 2022 05:35:17 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D008B3AB0C for ; Wed, 12 Oct 2022 02:35:15 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MnS7W3N5ZzVhlf; Wed, 12 Oct 2022 17:30:47 +0800 (CST) Received: from dggpemm500012.china.huawei.com (7.185.36.89) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 12 Oct 2022 17:35:14 +0800 Received: from localhost.huawei.com (10.175.124.27) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 12 Oct 2022 17:35:13 +0800 From: gaoxingwang To: CC: , , , , Subject: [PATCH] maketable: clean up resources Date: Wed, 12 Oct 2022 17:35:34 +0800 Message-ID: <20221012093534.15433-1-gaoxingwang1@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: gaoxingwang --- netem/maketable.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netem/maketable.c b/netem/maketable.c index ccb8f0c6..f91ce221 100644 --- a/netem/maketable.c +++ b/netem/maketable.c @@ -230,5 +230,8 @@ main(int argc, char **argv) inverse = inverttable(table, TABLESIZE, DISTTABLESIZE, total); interpolatetable(inverse, TABLESIZE); printtable(inverse, TABLESIZE); + free(table); + free(inverse) + close(fp); return 0; }