Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)

from before "if(x) free(x)".
This commit is contained in:
Rob Landley
2006-03-01 16:39:45 +00:00
parent 93f2286e6e
commit e7c43b66d7
33 changed files with 139 additions and 281 deletions

View File

@ -280,8 +280,7 @@ static void free_cache(struct unix_private_data *data)
cache->access_time = 0;
cache->dirty = 0;
cache->in_use = 0;
if (cache->buf)
ext2fs_free_mem(&cache->buf);
ext2fs_free_mem(&cache->buf);
cache->buf = 0;
}
}
@ -461,8 +460,7 @@ cleanup:
free_cache(data);
ext2fs_free_mem(&data);
}
if (io)
ext2fs_free_mem(&io);
ext2fs_free_mem(&io);
return retval;
}
@ -487,8 +485,7 @@ static errcode_t unix_close(io_channel channel)
free_cache(data);
ext2fs_free_mem(&channel->private_data);
if (channel->name)
ext2fs_free_mem(&channel->name);
ext2fs_free_mem(&channel->name);
ext2fs_free_mem(&channel);
return retval;
}