]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tcp: fix wrong used variable initialization, issue #5290
authorJaroslav Kysela <perex@perex.cz>
Wed, 24 Oct 2018 17:57:29 +0000 (19:57 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Oct 2018 17:57:39 +0000 (19:57 +0200)
src/tcp.c

index 5349784a48b258f19913d22a91d498125a48d0e7..e38f189beeaf115ea4a60013faeca5968db1db55 100644 (file)
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -575,7 +575,7 @@ tcp_connection_launch
   (int fd, void (*status) (void *opaque, htsmsg_t *m), access_t *aa)
 {
   tcp_server_launch_t *tsl, *res;
-  uint32_t used = 0, used2;
+  uint32_t used, used2;
   int64_t started = mclk();
   int c1, c2;
 
@@ -588,6 +588,7 @@ tcp_connection_launch
 
 try_again:
   res = NULL;
+  used = 0;
   LIST_FOREACH(tsl, &tcp_server_active, alink) {
     if (tsl->fd == fd) {
       res = tsl;