heimdal: Add missing kadm5 error checks
Generally obtained from upstream 655c057769f56bd8cdb7d16e93f1e7a7cb260342.
PR: 267944, 267972
Obtained from: Heimdal commit 655c057769f56bd8cdb7d16e93f1e7a7cb260342
(cherry picked from commit 780f663df3a0fc30da5f0680c128087b1a05ea40)