1
1

* direntry.c (vfs_s_free_entry): g_free handles NULL argument too,

no need for the comparison.
        * extfs.c (extfs_free_archive): Likewise.
            (extfs_open_archive): Likewise.
            (extfs_read_archive): Likewise.
            (extfs_remove_entry): Likewise.
            (extfs_free_entry): Likewise.
        * fish.c (fish_open_archive): Likewise.
            (fish_archive_same): Likewise.
        * ftpfs.c (ftpfs_split_url):  Likewise.
        * local.c       (local_closedir): Likewise.
        * mcserv.c (close_handle): Likewise.
        * smbfs.c (smbfs_free_bucket): Likewise.
        * tar.c (tar_read_header): Likewise.
        * undelfs.c (undelfs_shutdown): Likewise.
        * vfs.c (vfs_shut): Likewise.
Этот коммит содержится в:
Andrew V. Samoilov 2004-09-24 23:00:18 +00:00
родитель 12d24222db
Коммит c060826178
11 изменённых файлов: 37 добавлений и 35 удалений

Просмотреть файл

@ -1,3 +1,22 @@
2004-09-25 Pavel S. Shirshov <pavelsh@mail.ru>
* direntry.c (vfs_s_free_entry): g_free handles NULL argument too,
no need for the comparison.
* extfs.c (extfs_free_archive): Likewise.
(extfs_open_archive): Likewise.
(extfs_read_archive): Likewise.
(extfs_remove_entry): Likewise.
(extfs_free_entry): Likewise.
* fish.c (fish_open_archive): Likewise.
(fish_archive_same): Likewise.
* ftpfs.c (ftpfs_split_url): Likewise.
* local.c (local_closedir): Likewise.
* mcserv.c (close_handle): Likewise.
* smbfs.c (smbfs_free_bucket): Likewise.
* tar.c (tar_read_header): Likewise.
* undelfs.c (undelfs_shutdown): Likewise.
* vfs.c (vfs_shut): Likewise.
2004-09-24 Roland Illig <roland.illig@gmx.de>
* vfs.c (mc_open): Corrected FIXME. Now the "mode" parameter is

Просмотреть файл

@ -111,10 +111,8 @@ vfs_s_free_entry (struct vfs_class *me, struct vfs_s_entry *ent)
ent->next->prevp = ent->prevp;
}
if (ent->name){
g_free (ent->name);
ent->name = NULL;
}
g_free (ent->name);
ent->name = NULL;
if (ent->ino){
ent->ino->ent = NULL;

Просмотреть файл

@ -207,8 +207,7 @@ static void extfs_free_archive (struct archive *archive)
archive->local_stat.st_mtime != my.st_mtime);
g_free(archive->local_name);
}
if (archive->name)
g_free (archive->name);
g_free (archive->name);
g_free (archive);
}
@ -241,8 +240,7 @@ extfs_open_archive (int fstype, const char *name, struct archive **pparc)
cmd =
g_strconcat (mc_extfsdir, extfs_prefixes[fstype], " list ",
local_name ? local_name : tmp, (char *) NULL);
if (tmp)
g_free (tmp);
g_free (tmp);
g_free (mc_extfsdir);
open_error_pipe ();
result = popen (cmd, "r");
@ -409,8 +407,7 @@ extfs_read_archive (int fstype, const char *name, struct archive **pparc)
}
read_extfs_continue:
g_free (current_file_name);
if (current_link_name != NULL)
g_free (current_link_name);
g_free (current_link_name);
}
}
@ -1190,8 +1187,7 @@ static void extfs_remove_entry (struct entry *e)
unlink (e->inode->local_filename);
free (e->inode->local_filename);
}
if (e->inode->linkname != NULL)
g_free (e->inode->linkname);
g_free (e->inode->linkname);
g_free (e->inode);
}
@ -1213,8 +1209,7 @@ static void extfs_free_entry (struct entry *e)
unlink (e->inode->local_filename);
free (e->inode->local_filename);
}
if (e->inode->linkname != NULL)
g_free (e->inode->linkname);
g_free (e->inode->linkname);
g_free (e->inode);
}
if (e->next_in_dir != NULL)

Просмотреть файл

@ -311,8 +311,7 @@ fish_open_archive (struct vfs_class *me, struct vfs_s_super *super,
p = vfs_split_url (strchr (op, ':') + 1, &host, &user, &flags,
&password, 0, URL_NOSLASH);
if (p)
g_free (p);
g_free (p);
SUP.host = host;
SUP.user = user;
@ -335,8 +334,7 @@ fish_archive_same (struct vfs_class *me, struct vfs_s_super *super,
op = vfs_split_url (strchr (op, ':') + 1, &host, &user, &flags, 0, 0,
URL_NOSLASH);
if (op)
g_free (op);
g_free (op);
flags = ((strcmp (host, SUP.host) == 0)
&& (strcmp (user, SUP.user) == 0) && (flags == SUP.flags));

Просмотреть файл

@ -242,8 +242,7 @@ ftpfs_split_url(char *path, char **host, char **user, int *port, char **pass)
g_free (new_user);
}
if (p)
g_free (p);
g_free (p);
}
/* Returns a reply code, check /usr/include/arpa/ftp.h for possible values */

Просмотреть файл

@ -101,8 +101,7 @@ local_closedir (void *data)
int i;
i = closedir (* (DIR **) data);
if (data)
g_free (data);
g_free (data);
return i;
}

Просмотреть файл

@ -418,8 +418,7 @@ close_handle (int handle)
mcfs_DIR.used--;
if (mcfs_DIR.dirs[handle])
closedir (mcfs_DIR.dirs[handle]);
if (mcfs_DIR.names[handle])
g_free (mcfs_DIR.names[handle]);
g_free (mcfs_DIR.names[handle]);
mcfs_DIR.dirs[handle] = 0;
mcfs_DIR.names[handle] = 0;
}

Просмотреть файл

@ -1006,7 +1006,7 @@ smbfs_free_bucket (smbfs_connection *bucket)
g_free (bucket->domain);
g_free (bucket->user);
wipe_password (bucket->password);
if (bucket->home) g_free (bucket->home);
g_free (bucket->home);
memset (bucket, 0, sizeof (smbfs_connection));
}

Просмотреть файл

@ -418,8 +418,7 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive,
longp = ((header->header.linkflag == LF_LONGNAME)
? &next_long_name : &next_long_link);
if (*longp)
g_free (*longp);
g_free (*longp);
bp = *longp = g_malloc (*h_size + 1);
for (size = *h_size; size > 0; size -= written) {

Просмотреть файл

@ -94,14 +94,11 @@ undelfs_shutdown (void)
if (fs)
ext2fs_close (fs);
fs = NULL;
if (ext2_fname)
g_free (ext2_fname);
g_free (ext2_fname);
ext2_fname = NULL;
if (delarray)
g_free (delarray);
g_free (delarray);
delarray = NULL;
if (block_buf)
g_free (block_buf);
g_free (block_buf);
block_buf = NULL;
}

Просмотреть файл

@ -949,8 +949,7 @@ vfs_shut (void)
vfs_gc_done ();
if (current_dir)
g_free (current_dir);
g_free (current_dir);
for (vfs = vfs_list; vfs; vfs = vfs->next)
if (vfs->done)