Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 30 Jul 2022 00:53:57 +0600
From: NRK <>
Subject: Re: Re: sysconf(_SC_NPROCESSORS_CONF) broken.

On Fri, Jul 29, 2022 at 11:42:19AM -0700, enh wrote:
> done:

	if (getline(&line, &allocated_size, fp) != -1) {
	  cpu_count = GetCpuCountFromString(line);

Shouldn't the buffer be `free`-ed regardless or weather getline fails or
not? The getline(3) manpage suggests so:

> If *lineptr is set to NULL before the call, then getline() will
> allocate a buffer for storing the line. This buffer should be freed by
> the user program even if getline() failed.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.