[PATCH 5.10 007/663] kdb: Make memory allocations more robust