9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9front@9front.org
Cc: 9front@9front.org
Subject: Re: [9front] cmd/sort: fix resource leak (patch)
Date: Fri, 01 Jan 2021 09:42:08 -0800	[thread overview]
Message-ID: <18544CC779308C2AA34DBCFF8C5ADF50@eigenstate.org> (raw)
In-Reply-To: <3BA32B1BEC14B099376DC7279062EB92@gmail.com>

Quoth Igor Boehm <boehm.igor@gmail.com>:
> diff -r 4c6206d69abb sys/src/cmd/sort.c
> --- a /sys/src/cmd/sort.c	Mon Dec 28 21:21:22 2020 +0100
> +++ b/sys/src/cmd/sort.c	Tue Dec 29 15:11:29 2020 +0100
> @@ -209,6 +209,7 @@
>  			free(ol);
>  			ol = l;
>  		}
> +		free(ol);
>  		return;
>  	}
>  
> 

Am I wrong in thinking that we should also be
freeing ol->key?

  reply	other threads:[~2021-01-01 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 14:28 Igor Boehm
2021-01-01 17:42 ` ori [this message]
2021-01-01 19:32   ` Igor Boehm
2021-01-01 19:49     ` ori

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=18544CC779308C2AA34DBCFF8C5ADF50@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.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).