[vlc-commits] SFTP: Simplify

Petri Hintukainen git at videolan.org
Sun Feb 28 19:56:48 CET 2016


vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sun Feb 28 14:53:29 2016 +0200| [1d6fbecaf6ea2972d7e79b94dba2f1b58a366d0a] | committer: Jean-Baptiste Kempf

SFTP: Simplify

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/access/sftp.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 942e24f..e7bd4c3 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -465,14 +465,12 @@ static input_item_t* DirRead( access_t *p_access )
         int i_type = LIBSSH2_SFTP_S_ISDIR( attrs.permissions ) ? ITEM_TYPE_DIRECTORY : ITEM_TYPE_FILE;
         p_item = input_item_NewWithTypeExt( psz_full_uri, psz_file,
                                             0, NULL, 0, 0, i_type, 1 );
+        free( psz_full_uri );
 
         if( p_item == NULL )
         {
-            free( psz_full_uri );
             break;
         }
-
-        free( psz_full_uri );
     }
 
     free( psz_file );



More information about the vlc-commits mailing list