From: Stephen Hemminger <stephen@networkplumber.org>
To: gaoxingwang <gaoxingwang1@huawei.com>
Cc: <netdev@vger.kernel.org>, <dsahern@gmail.com>,
<gnault@redhat.com>, <liaichun@huawei.com>, <yanan@huawei.com>
Subject: Re: [PATCH] maketable: clean up resources
Date: Mon, 17 Oct 2022 20:29:14 -0700 [thread overview]
Message-ID: <20221017202914.64cdd5f3@hermes.local> (raw)
In-Reply-To: <20221012093534.15433-1-gaoxingwang1@huawei.com>
On Wed, 12 Oct 2022 17:35:34 +0800
gaoxingwang <gaoxingwang1@huawei.com> wrote:
> Signed-off-by: gaoxingwang <gaoxingwang1@huawei.com>
> ---
> 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;
> }
Why bother. This is a tool only used during builds and this the end
of the main program so all resources will disappear after return.
next prev parent reply other threads:[~2022-10-18 3:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 9:35 [PATCH] maketable: clean up resources gaoxingwang
2022-10-18 3:29 ` Stephen Hemminger [this message]
2022-10-20 9:36 ` gaoxingwang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221017202914.64cdd5f3@hermes.local \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=gaoxingwang1@huawei.com \
--cc=gnault@redhat.com \
--cc=liaichun@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=yanan@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.