tree-wide: propagate the error we got from strv_extend_xyz() to the caller
It's a bit sloppy to return -ENOMEM rather than the actual error we already returned in the first place (even though it's always going to be ENOMEM)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
static int denylist_modules(const char *p, char ***denylist) {
|
||||
_cleanup_strv_free_ char **k = NULL;
|
||||
int r;
|
||||
|
||||
assert(p);
|
||||
assert(denylist);
|
||||
@@ -16,8 +17,9 @@ static int denylist_modules(const char *p, char ***denylist) {
|
||||
if (!k)
|
||||
return -ENOMEM;
|
||||
|
||||
if (strv_extend_strv(denylist, k, true) < 0)
|
||||
return -ENOMEM;
|
||||
r = strv_extend_strv(denylist, k, /* filter_duplicates= */ true);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user