Ticket #1175: 0001-Add-missing-va_end-s.patch

File 0001-Add-missing-va_end-s.patch, 1.2 KB (added by muks, 13 years ago)

Patch to add missing va_end()s

  • libtransmission/crypto.c

    From 145bb031f5a2e8940b1833d97daf3b11dd9f2172 Mon Sep 17 00:00:00 2001
    From: Mukund Sivaraman <muks@banu.com>
    Date: Mon, 11 Aug 2008 08:30:02 +0530
    Subject: [PATCH] Add missing va_end()s
    
    ---
     libtransmission/crypto.c |    1 +
     libtransmission/utils.c  |    2 ++
     2 files changed, 3 insertions(+), 0 deletions(-)
    
    diff --git a/libtransmission/crypto.c b/libtransmission/crypto.c
    index ab24eab..a824bc4 100644
    a b tr_sha1( uint8_t * setme, 
    5050            break;
    5151        SHA1_Update( &sha, content, content_len );
    5252    }
     53    va_end( vl );
    5354    SHA1_Final( setme, &sha );
    5455}
    5556
  • libtransmission/utils.c

    diff --git a/libtransmission/utils.c b/libtransmission/utils.c
    index 9d728e5..febb458 100644
    a b tr_buildPath ( char *buf, size_t buflen, const char *first_element, ... ) 
    558558    else
    559559        *buf = '\0';
    560560    evbuffer_free( evbuf );
     561    va_end( vl );
    561562}
    562563
    563564int
    tr_strdup_printf( const char * fmt, ... ) 
    674675    if( evbuffer_add_vprintf( buf, fmt, ap ) != -1 )
    675676        ret = tr_strdup( (char*)EVBUFFER_DATA( buf ) );
    676677    evbuffer_free( buf );
     678    va_end( ap );
    677679
    678680    return ret;
    679681}