Properly cleanup varargs in LDAP fetcher's set_option()
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 13:13:17 +0000 (15:13 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 13:13:17 +0000 (15:13 +0200)
src/libstrongswan/plugins/ldap/ldap_fetcher.c

index fc6114b..75f9648 100644 (file)
@@ -176,13 +176,14 @@ METHOD(fetcher_t, set_option, bool,
        switch (option)
        {
                case FETCH_TIMEOUT:
-               {
                        this->timeout = va_arg(args, u_int);
-                       return TRUE;
-               }
+                       break;
                default:
+                       va_end(args);
                        return FALSE;
        }
+       va_end(args);
+       return TRUE;
 }
 
 METHOD(fetcher_t, destroy, void,