]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Clean up gpst parse_login_xml() a little
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 15 Aug 2017 13:50:55 +0000 (14:50 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 27 Feb 2018 15:27:03 +0000 (16:27 +0100)
commit3915e761409f01e8524a4abb1a6b754b96b16a40
treea15dd557f07788d2429a15f97982be64195fb2e2
parent0b42053146dd882ff210fd8d5274e95d7ea3c6d8
Clean up gpst parse_login_xml() a little

Fix a potential double-free when we hit a non-"argument" node, which could
cause a 'goto err_out' with value still set to the one that was already
freed last time round the loop.

Cosmetic changes to the args array, and change the loop over them. The
'continue' on !arg->opt doesn't seem to be useful; let's use !arg->opt
as the condition to terminate the loop instead.

Most 'const' removal, although actually I think it probably *can* be
const if we just use xml_node->content directly, and that means we don't
need to free it at all. Didn't want to make that change without testing
it though.

Steal cookie->data instead of strdup() and then immediately freeing it,
like we do for Juniper.

Other trivial cosmetic changes (spaces, !x instead of x==NULL or even
X == NULL).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
auth-globalprotect.c