auth: Don't forget to free OC_FORM_OPT_STOKEN entries
authorKevin Cernekee <cernekee@gmail.com>
Sat, 27 Oct 2012 22:26:11 +0000 (15:26 -0700)
committerKevin Cernekee <cernekee@gmail.com>
Sun, 28 Oct 2012 05:10:03 +0000 (22:10 -0700)
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
auth.c

diff --git a/auth.c b/auth.c
index 039c939..d51da87 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -500,7 +500,8 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response,
                struct oc_form_opt *tmp = form->opts->next;
                if (form->opts->type == OC_FORM_OPT_TEXT ||
                    form->opts->type == OC_FORM_OPT_PASSWORD ||
-                   form->opts->type == OC_FORM_OPT_HIDDEN)
+                   form->opts->type == OC_FORM_OPT_HIDDEN ||
+                   form->opts->type == OC_FORM_OPT_STOKEN)
                        free(form->opts->value);
                else if (form->opts->type == OC_FORM_OPT_SELECT) {
                        struct oc_form_opt_select *sel = (void *)form->opts;