[vlc-commits] audioscrobbler: Fix socket leaks on error

Hugo Beauzée-Luyssen git at videolan.org
Wed Dec 2 16:36:30 CET 2015


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Dec  2 11:45:00 2015 +0100| [0875ed64edb94da7bd9df06e9054a330fe4cf15d] | committer: Hugo Beauzée-Luyssen

audioscrobbler: Fix socket leaks on error

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0875ed64edb94da7bd9df06e9054a330fe4cf15d
---

 modules/misc/audioscrobbler.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index f549110..cea0d6a 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -854,6 +854,7 @@ static void *Run(void *data)
             /* If connection fails, we assume we must handshake again */
             HandleInterval(&next_exchange, &i_interval);
             b_handshaked = false;
+            net_Close(i_post_socket);
             continue;
         }
 
@@ -867,6 +868,7 @@ static void *Run(void *data)
         if (i_net_ret <= 0)
         {
             /* if we get no answer, something went wrong : try again */
+            net_Close(i_post_socket);
             continue;
         }
 



More information about the vlc-commits mailing list