Ticket #1896: 1896-possible_gfree-miss_in_vfs-extfs.c.patch

File 1896-possible_gfree-miss_in_vfs-extfs.c.patch, 1.7 KB (added by vit_r, 14 years ago)
  • vfs/extfs.c

    From 746af5b77739dc7f82eb933121fbcea673d04a45 Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Thu, 24 Dec 2009 14:50:18 +0000
    Subject: [PATCH]  possible_missing__g_free__in_vfs-extfs.c
    
    ---
     vfs/extfs.c |    4 ++++
     1 files changed, 4 insertions(+), 0 deletions(-)
    
    diff --git a/vfs/extfs.c b/vfs/extfs.c
    index d30774e..47498c2 100644
    a b extfs_readlink (struct vfs_class *me, const char *path, char *buf, size_t size) 
    10101010    if ((q = extfs_get_path_mangle (me, mpath, &archive, 0)) == NULL) 
    10111011        goto cleanup; 
    10121012    entry = extfs_find_entry (archive->root_entry, q, 0, 0); 
     1013    g_free (q); 
    10131014    if (entry == NULL) 
    10141015        goto cleanup; 
    10151016    if (!S_ISLNK (entry->inode->mode)) { 
    static int extfs_unlink (struct vfs_class *me, const char *file) 
    10611062    if ((q = extfs_get_path_mangle (me, mpath, &archive, 0)) == NULL) 
    10621063        goto cleanup; 
    10631064    entry = extfs_find_entry (archive->root_entry, q, 0, 0); 
     1065    g_free (q); 
    10641066    if (entry == NULL) 
    10651067        goto cleanup; 
    10661068    if ((entry = extfs_resolve_symlinks (entry)) == NULL) 
    static int extfs_mkdir (struct vfs_class *me, const char *path, mode_t mode) 
    10971099        goto cleanup; 
    10981100    } 
    10991101    entry = extfs_find_entry (archive->root_entry, q, 1, 0); 
     1102    g_free (q); 
    11001103    if (entry == NULL) 
    11011104        goto cleanup; 
    11021105    if ((entry = extfs_resolve_symlinks (entry)) == NULL) 
    static int extfs_rmdir (struct vfs_class *me, const char *path) 
    11271130    if ((q = extfs_get_path_mangle (me, mpath, &archive, 0)) == NULL) 
    11281131        goto cleanup; 
    11291132    entry = extfs_find_entry (archive->root_entry, q, 0, 0); 
     1133    g_free (q); 
    11301134    if (entry == NULL) 
    11311135        goto cleanup; 
    11321136    if ((entry = extfs_resolve_symlinks (entry)) == NULL)