[vlc-devel] [PATCH] access/zip:patch for memory leak in zipstream.c #8726
    Rafaël Carré 
    funman at videolan.org
       
    Wed Nov 27 02:09:43 CET 2013
    
    
  
Hi,
Le 25/11/2013 11:49, Gaurav Pruthi a écrit :
> ---
>  modules/access/zip/zipstream.c |    4+++-
>  1 file changed, 3 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
> index d12bd29..3e7032b 100644
> --- a/modules/access/zip/zipstream.c
> +++ b/modules/access/zip/zipstream.c
> @@ -717,7 +717,9 @@ static node* findOrCreateParentNode( node *root, const char *fullpath )
>          if( !strcmp( current->name, folder ) )
It seems that folder is an alias for path, could you clean that up while
you are in this code please? :)
That way we'd better see how/when it is used and when it can be freed
>          {
>              /* We found the folder, go recursively deeper */
> -            return findOrCreateParentNode( current, sep );
> +            node *parentNode = findOrCreateParentNode( current, sep );
> +            free( path );
> +            return parentNode;
Else, patch is OK.
>          }
>          current = current->next;
>      }
> --
> 1.7.9.5
    
    
More information about the vlc-devel
mailing list