cgls: look at the right variable in error path (#5234)

CID #1370779.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-02-06 07:34:01 -05:00
committed by Lennart Poettering
parent 52e634271f
commit 65c8834942

View File

@@ -241,9 +241,9 @@ int main(int argc, char *argv[]) {
goto finish;
}
r = cg_split_spec(*name, &c, &p);
if (r < 0) {
log_error_errno(r, "Failed to split argument %s: %m", *name);
q = cg_split_spec(*name, &c, &p);
if (q < 0) {
log_error_errno(q, "Failed to split argument %s: %m", *name);
goto failed;
}