lib/hdb: hdb_create consistently check cb_ctx.h
commite0e61d2b916a2d0ac176590ec7c1ec7b48b9eec5
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 24 Jan 2022 02:27:56 +0000 (23 21:27 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 24 Jan 2022 02:27:56 +0000 (23 21:27 -0500)
tree712e58e83d1d2dbf449b76dde50dbf354d225e44
parent38536d7313b080bc0b3c536f09fac533502df5a1
lib/hdb: hdb_create consistently check cb_ctx.h

instead of testing both cb_ctx.h and cb_ctx.h->prefix
for non-NULL, ensure that cb_ctx.h is NULL after each
failed for() loop.  This also ensures that cb_ctx.h
is never left pointing to an invalid non-NULL value.

Change-Id: I3264577b0fbf1d620b00f87d251e8c43b81e0f29
lib/hdb/hdb.c