FILE *f;
char line[LINE_MAX];
bool in_section = false;
+ int r;
context_free_x11(c);
if (in_section && first_word(l, "Option")) {
char **a;
- a = strv_split_quoted(l);
- if (!a) {
+ r = strv_split_quoted(&a, l);
+ if (r < 0) {
fclose(f);
- return -ENOMEM;
+ return r;
}
if (strv_length(a) == 3) {
} else if (!in_section && first_word(l, "Section")) {
char **a;
- a = strv_split_quoted(l);
- if (!a) {
+ r = strv_split_quoted(&a, l);
+ if (r < 0) {
fclose(f);
return -ENOMEM;
}
for (;;) {
char line[LINE_MAX];
char *l, **b;
+ int r;
errno = 0;
if (!fgets(line, sizeof(line), f)) {
if (l[0] == 0 || l[0] == '#')
continue;
- b = strv_split_quoted(l);
- if (!b)
- return -ENOMEM;
+ r = strv_split_quoted(&b, l);
+ if (r < 0)
+ return r;
if (strv_length(b) < 5) {
log_error("Invalid line "SYSTEMD_KBD_MODEL_MAP":%u, ignoring.", *n);