hurd: Fix calling vm_deallocate (NULL)
commitf84c3ceb0447477eb022cd5da6c8f27a705deae6
authorSergey Bugaev <bugaevc@gmail.com>
Sun, 25 Jun 2023 23:17:49 +0000 (26 02:17 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 2 Jul 2023 23:38:12 +0000 (3 01:38 +0200)
tree1bf12f75f7ff37e7b7056672c4a2dc115a6bcaed
parent4b5e576fc21931969c0a1b53fdaf7ce3bfcebb86
hurd: Fix calling vm_deallocate (NULL)

Only call vm_deallocate when we do have the old buffer, and check for
unexpected errors.

Spotted while debugging a msgids/readdir issue on x86_64-gnu.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230625231751.404120-3-bugaevc@gmail.com>
sysdeps/mach/hurd/readdir64.c