From 8cee197caca6a9b2c936cc4069c500025140dfb9 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 14 Dec 2009 17:46:00 +0000 Subject: [PATCH] (trunk libT) fix minor memory leak in libtransmission/tr-dht.c, found by valgrind --- libtransmission/tr-dht.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c index e0ba1c3f5..106eae41b 100644 --- a/libtransmission/tr-dht.c +++ b/libtransmission/tr-dht.c @@ -187,7 +187,7 @@ dht_bootstrap(void *closure) if(!bootstrap_done(cl->session, 0)) { char *bootstrap_file; - FILE *f = NULL; + FILE *f; bootstrap_file = tr_buildPath(cl->session->configDir, "dht.bootstrap", NULL); @@ -221,6 +221,8 @@ dht_bootstrap(void *closure) break; } } + + tr_free( bootstrap_file ); } /* We really don't want to abuse our bootstrap nodes.