netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, David Ahern <dsahern@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, schoen@loyalty.org
Subject: Re: [PATCH net-next v2 06/11] selftests: Use separate stdout and stderr buffers in nettest
Date: Mon, 11 Jan 2021 17:20:56 -0700	[thread overview]
Message-ID: <45473342-cba7-c489-2cd4-738eb7424dc8@gmail.com> (raw)
In-Reply-To: <20210111161546.1310e9da@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 1/11/21 5:15 PM, Jakub Kicinski wrote:
>> diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c
>> index 0e4196027d63..13c74774e357 100644
>> --- a/tools/testing/selftests/net/nettest.c
>> +++ b/tools/testing/selftests/net/nettest.c
>> @@ -1705,9 +1705,27 @@ static char *random_msg(int len)
>>  
>>  static int ipc_child(int fd, struct sock_args *args)
>>  {
>> +	char *outbuf, *errbuf;
>> +	int rc;
>> +
>> +	outbuf = malloc(4096);
>> +	errbuf = malloc(4096);
>> +	if (!outbuf || !errbuf) {
>> +		fprintf(stderr, "server: Failed to allocate buffers for stdout and stderr\n");
>> +		return 1;
> 
> that's a memleak, rc = 1, goto free; ?
> 
> Also there's a few uses of fprintf(stderr, .. instead of log_error()
> is there a reason for it?
> 
> I don't think this is a big deal, I'll apply unless you object in time.
> 

good catch. I found a bug in patch 5 as well. I'll fix and re-send.

  reply	other threads:[~2021-01-12  0:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10  0:18 [PATCH net-next v2 00/11] selftests: Updates to allow single instance of nettest for client and server David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 01/11] selftests: Move device validation in nettest David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 02/11] selftests: Move convert_addr up " David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 03/11] selftests: Move address validation " David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 04/11] selftests: Add options to set network namespace to nettest David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 05/11] selftests: Add support to nettest to run both client and server David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 06/11] selftests: Use separate stdout and stderr buffers in nettest David Ahern
2021-01-12  0:15   ` Jakub Kicinski
2021-01-12  0:20     ` David Ahern [this message]
2021-01-10  0:18 ` [PATCH net-next v2 07/11] selftests: Add missing newline in nettest error messages David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 08/11] selftests: Make address validation apply only to client mode David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 09/11] selftests: Consistently specify address for MD5 protection David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 10/11] selftests: Add new option for client-side passwords David Ahern
2021-01-10  0:18 ` [PATCH net-next v2 11/11] selftests: Add separate options for server device bindings David Ahern

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=45473342-cba7-c489-2cd4-738eb7424dc8@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=schoen@loyalty.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).