mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
conf: don't allow a NULL config name
No functional changes, this is enforced by the only in-tree callers of pw_conf_load_conf() but let's enforce this properly.
This commit is contained in:
parent
fb2d35895e
commit
bba9edabee
2 changed files with 22 additions and 2 deletions
|
|
@ -75,9 +75,24 @@ PWTEST(config_load_abspath)
|
|||
return PWTEST_PASS;
|
||||
}
|
||||
|
||||
PWTEST_SUITE(context)
|
||||
PWTEST(config_load_nullname)
|
||||
{
|
||||
pwtest_add(config_load_abspath, PWTEST_NOARG);
|
||||
struct pw_properties *props = pw_properties_new("ignore", "me", NULL);
|
||||
int r;
|
||||
|
||||
r = pw_conf_load_conf(NULL, NULL, props);
|
||||
pwtest_neg_errno(r, -EINVAL);
|
||||
|
||||
r = pw_conf_load_conf("/dummy", NULL, props);
|
||||
pwtest_neg_errno(r, -EINVAL);
|
||||
|
||||
return PWTEST_PASS;
|
||||
}
|
||||
|
||||
PWTEST_SUITE(context)
|
||||
{
|
||||
pwtest_add(config_load_abspath, PWTEST_NOARG);
|
||||
pwtest_add(config_load_nullname, PWTEST_NOARG);
|
||||
|
||||
return PWTEST_PASS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue