From 3bb3d2c0743187c4e4648204673c37f83bff8d74 Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Fri, 3 Nov 2006 17:23:51 +0000 Subject: [PATCH] Initialize the interval variable even when we don't read its value from the tracker reply. --- btpd/http_tr_if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btpd/http_tr_if.c b/btpd/http_tr_if.c index 568b93c..ab5639a 100644 --- a/btpd/http_tr_if.c +++ b/btpd/http_tr_if.c @@ -66,8 +66,10 @@ parse_reply(struct torrent *tp, const char *content, size_t size, int parse, return 1; } - if (!parse) + if (!parse) { + *interval = -1; return 0; + } if (!benc_dct_chk(content, 2, BE_INT, 1, "interval", BE_ANY, 1, "peers")) goto bad_data;