Re: [PATCH] Stop docproc segfaulting when SRCTREE isn't set.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux