* 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.
Этот коммит содержится в:
родитель
12d24222db
Коммит
c060826178
@ -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>
|
2004-09-24 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
* vfs.c (mc_open): Corrected FIXME. Now the "mode" parameter is
|
* 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;
|
ent->next->prevp = ent->prevp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ent->name){
|
g_free (ent->name);
|
||||||
g_free (ent->name);
|
ent->name = NULL;
|
||||||
ent->name = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ent->ino){
|
if (ent->ino){
|
||||||
ent->ino->ent = NULL;
|
ent->ino->ent = NULL;
|
||||||
|
15
vfs/extfs.c
15
vfs/extfs.c
@ -207,8 +207,7 @@ static void extfs_free_archive (struct archive *archive)
|
|||||||
archive->local_stat.st_mtime != my.st_mtime);
|
archive->local_stat.st_mtime != my.st_mtime);
|
||||||
g_free(archive->local_name);
|
g_free(archive->local_name);
|
||||||
}
|
}
|
||||||
if (archive->name)
|
g_free (archive->name);
|
||||||
g_free (archive->name);
|
|
||||||
g_free (archive);
|
g_free (archive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,8 +240,7 @@ extfs_open_archive (int fstype, const char *name, struct archive **pparc)
|
|||||||
cmd =
|
cmd =
|
||||||
g_strconcat (mc_extfsdir, extfs_prefixes[fstype], " list ",
|
g_strconcat (mc_extfsdir, extfs_prefixes[fstype], " list ",
|
||||||
local_name ? local_name : tmp, (char *) NULL);
|
local_name ? local_name : tmp, (char *) NULL);
|
||||||
if (tmp)
|
g_free (tmp);
|
||||||
g_free (tmp);
|
|
||||||
g_free (mc_extfsdir);
|
g_free (mc_extfsdir);
|
||||||
open_error_pipe ();
|
open_error_pipe ();
|
||||||
result = popen (cmd, "r");
|
result = popen (cmd, "r");
|
||||||
@ -409,8 +407,7 @@ extfs_read_archive (int fstype, const char *name, struct archive **pparc)
|
|||||||
}
|
}
|
||||||
read_extfs_continue:
|
read_extfs_continue:
|
||||||
g_free (current_file_name);
|
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);
|
unlink (e->inode->local_filename);
|
||||||
free (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);
|
g_free (e->inode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1213,8 +1209,7 @@ static void extfs_free_entry (struct entry *e)
|
|||||||
unlink (e->inode->local_filename);
|
unlink (e->inode->local_filename);
|
||||||
free (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);
|
g_free (e->inode);
|
||||||
}
|
}
|
||||||
if (e->next_in_dir != NULL)
|
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,
|
p = vfs_split_url (strchr (op, ':') + 1, &host, &user, &flags,
|
||||||
&password, 0, URL_NOSLASH);
|
&password, 0, URL_NOSLASH);
|
||||||
|
|
||||||
if (p)
|
g_free (p);
|
||||||
g_free (p);
|
|
||||||
|
|
||||||
SUP.host = host;
|
SUP.host = host;
|
||||||
SUP.user = user;
|
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,
|
op = vfs_split_url (strchr (op, ':') + 1, &host, &user, &flags, 0, 0,
|
||||||
URL_NOSLASH);
|
URL_NOSLASH);
|
||||||
|
|
||||||
if (op)
|
g_free (op);
|
||||||
g_free (op);
|
|
||||||
|
|
||||||
flags = ((strcmp (host, SUP.host) == 0)
|
flags = ((strcmp (host, SUP.host) == 0)
|
||||||
&& (strcmp (user, SUP.user) == 0) && (flags == SUP.flags));
|
&& (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);
|
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 */
|
/* Returns a reply code, check /usr/include/arpa/ftp.h for possible values */
|
||||||
|
@ -101,8 +101,7 @@ local_closedir (void *data)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = closedir (* (DIR **) data);
|
i = closedir (* (DIR **) data);
|
||||||
if (data)
|
g_free (data);
|
||||||
g_free (data);
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,8 +418,7 @@ close_handle (int handle)
|
|||||||
mcfs_DIR.used--;
|
mcfs_DIR.used--;
|
||||||
if (mcfs_DIR.dirs[handle])
|
if (mcfs_DIR.dirs[handle])
|
||||||
closedir (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.dirs[handle] = 0;
|
||||||
mcfs_DIR.names[handle] = 0;
|
mcfs_DIR.names[handle] = 0;
|
||||||
}
|
}
|
||||||
|
@ -1006,7 +1006,7 @@ smbfs_free_bucket (smbfs_connection *bucket)
|
|||||||
g_free (bucket->domain);
|
g_free (bucket->domain);
|
||||||
g_free (bucket->user);
|
g_free (bucket->user);
|
||||||
wipe_password (bucket->password);
|
wipe_password (bucket->password);
|
||||||
if (bucket->home) g_free (bucket->home);
|
g_free (bucket->home);
|
||||||
memset (bucket, 0, sizeof (smbfs_connection));
|
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)
|
longp = ((header->header.linkflag == LF_LONGNAME)
|
||||||
? &next_long_name : &next_long_link);
|
? &next_long_name : &next_long_link);
|
||||||
|
|
||||||
if (*longp)
|
g_free (*longp);
|
||||||
g_free (*longp);
|
|
||||||
bp = *longp = g_malloc (*h_size + 1);
|
bp = *longp = g_malloc (*h_size + 1);
|
||||||
|
|
||||||
for (size = *h_size; size > 0; size -= written) {
|
for (size = *h_size; size > 0; size -= written) {
|
||||||
|
@ -94,14 +94,11 @@ undelfs_shutdown (void)
|
|||||||
if (fs)
|
if (fs)
|
||||||
ext2fs_close (fs);
|
ext2fs_close (fs);
|
||||||
fs = NULL;
|
fs = NULL;
|
||||||
if (ext2_fname)
|
g_free (ext2_fname);
|
||||||
g_free (ext2_fname);
|
|
||||||
ext2_fname = NULL;
|
ext2_fname = NULL;
|
||||||
if (delarray)
|
g_free (delarray);
|
||||||
g_free (delarray);
|
|
||||||
delarray = NULL;
|
delarray = NULL;
|
||||||
if (block_buf)
|
g_free (block_buf);
|
||||||
g_free (block_buf);
|
|
||||||
block_buf = NULL;
|
block_buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -949,8 +949,7 @@ vfs_shut (void)
|
|||||||
|
|
||||||
vfs_gc_done ();
|
vfs_gc_done ();
|
||||||
|
|
||||||
if (current_dir)
|
g_free (current_dir);
|
||||||
g_free (current_dir);
|
|
||||||
|
|
||||||
for (vfs = vfs_list; vfs; vfs = vfs->next)
|
for (vfs = vfs_list; vfs; vfs = vfs->next)
|
||||||
if (vfs->done)
|
if (vfs->done)
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user