Added missing iso_filesystem_ref() for cloned node from local filesystem.
This commit is contained in:
parent
1082e628d1
commit
38483d894e
@ -1081,10 +1081,8 @@ int ifs_clone_src(IsoFileSource *old_source,
|
||||
goto no_mem;
|
||||
|
||||
new_data->fs = old_data->fs;
|
||||
iso_filesystem_ref(new_data->fs);
|
||||
|
||||
new_data->parent = old_data->parent;
|
||||
iso_file_source_ref(new_data->parent);
|
||||
|
||||
memcpy(&(new_data->info), &(old_data->info), sizeof(struct stat));
|
||||
new_data->name = new_name;
|
||||
@ -1106,6 +1104,8 @@ int ifs_clone_src(IsoFileSource *old_source,
|
||||
src->refcount = 1;
|
||||
src->data = new_data;
|
||||
*new_source = src;
|
||||
iso_file_source_ref(new_data->parent);
|
||||
iso_filesystem_ref(new_data->fs);
|
||||
return ISO_SUCCESS;
|
||||
no_mem:;
|
||||
if (src != NULL)
|
||||
|
@ -561,12 +561,14 @@ int lfs_clone_src(IsoFileSource *old_source,
|
||||
new_data->info.fd = -1; /* the value does not matter with (openned == 0) */
|
||||
new_data->name = new_name;
|
||||
new_data->parent = old_data->parent;
|
||||
iso_file_source_ref(new_data->parent);
|
||||
|
||||
src->class = old_source->class;
|
||||
src->refcount = 1;
|
||||
src->data = new_data;
|
||||
*new_source = src;
|
||||
|
||||
iso_file_source_ref(new_data->parent);
|
||||
iso_filesystem_ref(lfs);
|
||||
return ISO_SUCCESS;
|
||||
no_mem:;
|
||||
if (src != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user