This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] _nss_nis_initgroups_dyn: Use struct scratch_buffer [BZ #18023]
- From: DJ Delorie <dj at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 25 Jun 2018 17:46:20 -0400
- Subject: Re: [PATCH] _nss_nis_initgroups_dyn: Use struct scratch_buffer [BZ #18023]
Florian Weimer <fweimer@redhat.com> writes:
> You can free the buffer again, but you don't have to. There is no
> memory leak if you don't.
>
> The point here is not call free if we know it is a no-op.
>
> So I think the code is okay as-is.
Agreed, just checking ;-)
>> In this case, going to "done" *does* call scratch_buffer_free(). At
>> least we should be consistent within a given file ;-)
>
> Here we call the entire cleanup sequence, which happens to include
> scratch_buffer_free as well, so the situation is different.
Ok, as long as the inconsistency was intentional and reasoned, I'm OK
with it.