]> git.sesse.net Git - vlc/commitdiff
Fix compilation. Thanks bigben
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 29 Jul 2005 18:28:45 +0000 (18:28 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 29 Jul 2005 18:28:45 +0000 (18:28 +0000)
src/misc/httpd.c

index 7c33d54a1cb9e7f77a517d761c1f1bb4c79acab4..66c4bc2afd6bce5cc8bdd0c3716b3745b2e2fc52 100644 (file)
@@ -2064,17 +2064,18 @@ static void httpd_HostThread( httpd_host_t *host )
                             {
                                 if( answer && ( url->p_acl != NULL ) )
                                 {
-                                    char *ip = httpd_ClientIP( cl );
-                                    if( ip != NULL )
+                                    char ip[NI_MAXNUMERICHOST];
+
+                                    if( httpd_ClientIP( cl, ip ) != NULL )
                                     {
                                         if( ACL_Check( url->p_acl, ip ) )
                                         {
                                             b_hosts_failed = VLC_TRUE;
-                                            free( ip );
                                             break;
                                         }
-                                        free( ip );
                                     }
+                                    else
+                                        b_hosts_failed = VLC_TRUE;
                                 }
 
                                 if( answer && ( *url->psz_user || *url->psz_password ) )