Instead of masking them with -ENOMEM.
_cleanup_free_ CatalogItem *i = NULL;
_cleanup_free_ char *combined = NULL;
char *prev;
+ int r;
assert(h);
assert(payload);
if (!combined)
return log_oom();
- if (ordered_hashmap_update(h, i, combined) < 0)
- return log_oom();
+ r = ordered_hashmap_update(h, i, combined);
+ if (r < 0)
+ return r;
TAKE_PTR(combined);
free(prev);
if (!combined)
return log_oom();
- if (ordered_hashmap_put(h, i, combined) < 0)
- return log_oom();
+ r = ordered_hashmap_put(h, i, combined);
+ if (r < 0)
+ return r;
TAKE_PTR(i);
TAKE_PTR(combined);