if (!file)
{
- n = malloc(sizeof (Eina_File) + strlen(filename) + 1);
+ n = malloc(sizeof(Eina_File) + strlen(filename) + 1);
if (!n)
{
eina_lock_release(&_eina_file_lock_cache);
goto on_error;
}
+ memset(n, 0, sizeof(Eina_File));
n->filename = (char*) (n + 1);
strcpy((char*) n->filename, filename);
n->map = eina_hash_new(EINA_KEY_LENGTH(_eina_file_map_key_length),
3);
n->rmap = eina_hash_pointer_new(NULL);
n->global_map = MAP_FAILED;
- n->global_refcount = 0;
n->length = file_stat.st_size;
n->mtime = file_stat.st_mtime;
#ifdef _STAT_VER_LINUX
# endif
#endif
n->inode = file_stat.st_ino;
- n->refcount = 0;
n->fd = fd;
n->shared = shared;
- n->delete_me = EINA_FALSE;
- n->global_faulty = EINA_FALSE;
eina_lock_new(&n->lock);
eina_hash_direct_add(_eina_file_cache, n->filename, n);
}
goto close_fm;
}
+ memset(n, 0, sizeof(Eina_File));
n->filename = (char*) (n + 1);
strcpy((char*) n->filename, filename);
n->map = eina_hash_new(EINA_KEY_LENGTH(_eina_file_map_key_length),
3);
n->rmap = eina_hash_pointer_new(NULL);
n->global_map = MAP_FAILED;
- n->global_refcount = 0;
n->length = length.QuadPart;
n->mtime = mtime.QuadPart;
- n->refcount = 0;
n->handle = handle;
n->fm = fm;
n->shared = shared;
- n->delete_me = EINA_FALSE;
eina_lock_new(&n->lock);
eina_hash_direct_add(_eina_file_cache, n->filename, n);
}