mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-07 18:12:13 +00:00
LOG: set the return code when calloc fails
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
709b32de43
commit
a5795f7d45
@ -139,6 +139,7 @@ qb_array_index(struct qb_array * a, int32_t idx, void **element_out)
|
||||
if (a->bin[b] == NULL) {
|
||||
a->bin[b] = calloc(MAX_ELEMENTS_PER_BIN, a->element_size);
|
||||
if (a->bin[b] == NULL) {
|
||||
rc = -errno;
|
||||
goto unlock_error;
|
||||
}
|
||||
bin_alloced = QB_TRUE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user