codership / galera

Synchronous multi-master replication library
GNU General Public License v2.0
450 stars 176 forks source link

remove duplicate va_end call #617

Open zmiklank opened 2 years ago

zmiklank commented 2 years ago

From man va_end:

va_end()
  Each  invocation  of  va_start()  must  be  matched  by a corresponding invocation of
  va_end() in the same function.  After the call va_end(ap) the variable  ap  is  unde‐
  fined.   Multiple  traversals  of the list, each bracketed by va_start() and va_end()
  are possible.  va_end() may be a macro or a function.

In the _gu_db_doprnt_ function the va_end is called on the already undefined args variable, which can cause undefined behavior. This PR proposes to remove one va_end(args) call.