fix missing va_end()
authorMichael Vogt <mvo@debian.org>
Fri, 26 Jul 2013 20:12:36 +0000 (22:12 +0200)
committerMichael Vogt <mvo@debian.org>
Fri, 26 Jul 2013 20:17:33 +0000 (22:17 +0200)
methods/ftp.cc
methods/rsh.cc

index d55ac12..979adca 100644 (file)
@@ -436,6 +436,7 @@ bool FTPConn::WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...)
    char S[400];
    vsnprintf(S,sizeof(S) - 4,Fmt,args);
    strcat(S,"\r\n");
+   va_end(args);
  
    if (Debug == true)
       cerr << "-> '" << QuoteString(S,"") << "'" << endl;
index fb37823..d76dca6 100644 (file)
@@ -218,6 +218,8 @@ bool RSHConn::WriteMsg(std::string &Text,bool Sync,const char *Fmt,...)
    // sprintf the description
    char S[512];
    vsnprintf(S,sizeof(S) - 4,Fmt,args);
+   va_end(args);
+
    if (Sync == true)
       strcat(S," 2> /dev/null || echo\n");
    else