1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

(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

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 );