Re: [PATCH 2/7] lockfile: introduce alloc_lock_file() to avoid valgrind noise
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 19 quoted lines
>> - while (lock_file_list) {
>> - if (lock_file_list->owner == me &&
>> - lock_file_list->filename[0]) {
>> - if (lock_file_list->fd >= 0)
>> - close(lock_file_list->fd);
>> - unlink_or_warn(lock_file_list->filename);
>> - }
>> - lock_file_list = lock_file_list->next;
>> + while (p) {
>> + if (p->owner == me &&
>> + p->filename[0]) {
>> + if (p->fd >= 0)
>> + close(p->fd);
>> + unlink_or_warn(p->filename);
>> + }
>> + p = lock_file_list->next;
>> }
>
> Heh, shouldn't the last one assign from p->next?Yes. And I also should have mentioned: this is untested.