budb: SBUDB_FindLatestDump should check result of FillDumpEntry

FillDumpEntry may return an error, but FindLatestDump doesn't check its
result.  Therefore, SBUDB_FindLatestDump may return invalid results.

Instead, check the return code from FillDumpEntry and abort the call if
it fails.

Change-Id: If0b44ba2a12a76511129d77110ef669b00780ff0
Reviewed-on: https://gerrit.openafs.org/13312
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
Mark Vitale 2018-09-11 15:59:41 -04:00 committed by Benjamin Kaduk
parent 91bab84e7a
commit 2d8045d676

View File

@ -2230,7 +2230,9 @@ FindLatestDump(struct rx_call *call, char *vsname, char *dumpPath,
finished:
/* return the dump found */
FillDumpEntry(ut, retdbaddr, dumpentry);
eval = FillDumpEntry(ut, retdbaddr, dumpentry);
if (eval)
ABORT(eval);
code = ubik_EndTrans(ut);
return (code);