Properly cleanup varargs in enumerators of both SQL backends
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 13:10:29 +0000 (15:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 13:10:29 +0000 (15:10 +0200)
src/libstrongswan/plugins/mysql/mysql_database.c
src/libstrongswan/plugins/sqlite/sqlite_database.c

index 25ea42a..1a20a80 100644 (file)
@@ -472,6 +472,7 @@ static bool mysql_enumerator_enumerate(mysql_enumerator_t *this, ...)
                                break;
                }
        }
+       va_end(args);
        return TRUE;
 }
 
index f9e0619..0fb3c7f 100644 (file)
@@ -206,6 +206,7 @@ static bool sqlite_enumerator_enumerate(sqlite_enumerator_t *this, ...)
                        }
                        default:
                                DBG1(DBG_LIB, "invalid result type supplied");
+                               va_end(args);
                                return FALSE;
                }
        }