(trunk libT) fix a minor memory leak in the bencode regression tests.

Found by llvm's static analyzer. This is a minor issue since the leak is in an automated test rather than in shipping code, but it's still better to fix it.
This commit is contained in:
Jordan Lee 2011-12-14 05:44:15 +00:00
parent 0d13057111
commit f9cc51f0d3
1 changed files with 1 additions and 1 deletions

View File

@ -319,8 +319,8 @@ testJSONSnippet( const char * benc_str,
const char * expected )
{
tr_benc top;
struct evbuffer * buf = evbuffer_new( );
char * serialized;
struct evbuffer * buf;
tr_bencLoad( benc_str, strlen( benc_str ), &top, NULL );
buf = tr_bencToBuf( &top, TR_FMT_JSON );