All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: "Ahmed S. Darwish" <darwish.07@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	rdunlap@xenotime.net
Subject: Re: [PATCH] Stop docproc segfaulting when SRCTREE isn't set.
Date: Tue, 9 Oct 2007 17:19:23 -0500	[thread overview]
Message-ID: <200710091719.23265.rob@landley.net> (raw)
In-Reply-To: <20071009130315.GB4245@Ahmed>

On Tuesday 09 October 2007 8:03:15 am Ahmed S. Darwish wrote:
> $ man getcwd
>
>  char *getcwd(char *buf, size_t size);
>
>  As an extension to the POSIX.1 standard, Linux (libc4, libc5, glibc)
> getcwd() allocates the buffer dynamically using malloc() if buf is NULL on
> call.
>
> Shouldn't "srctree" be free()ed in case getenv("SRCTREE") failed ?

If exit() doesn't free all the memory the program allocated, we have bigger 
problems.

> Regards,

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

  parent reply	other threads:[~2007-10-09 22:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09  6:25 [PATCH] Stop docproc segfaulting when SRCTREE isn't set Rob Landley
2007-10-09 13:03 ` Ahmed S. Darwish
2007-10-09 15:55   ` Randy Dunlap
2007-10-09 17:19     ` Ahmed S. Darwish
2007-10-09 17:24       ` Randy Dunlap
2007-10-09 17:51         ` Ahmed S. Darwish
2007-10-09 22:19   ` Rob Landley [this message]
2007-10-09 15:56 ` Randy Dunlap
2007-10-18 11:53 ` Sam Ravnborg

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=200710091719.23265.rob@landley.net \
    --to=rob@landley.net \
    --cc=akpm@linux-foundation.org \
    --cc=darwish.07@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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.