ntfs_inode_close(ni);
out_free_utf8_name:
FREE(utf8_name);
-out:
return ret;
}
if (!root) {
if (errno == EILSEQ)
return WIMLIB_ERR_INVALID_UTF8_STRING;
- else
+ else if (errno == ENOMEM)
return WIMLIB_ERR_NOMEM;
+ else
+ return WIMLIB_ERR_ICONV_NOT_AVAILABLE;
}
*root_p = root;
destroy_sd_set(&sd_set);
out:
+ ntfs_index_ctx_put(vol->secure_xsii);
+ ntfs_index_ctx_put(vol->secure_xsdh);
+ ntfs_inode_close(vol->secure_ni);
+
if (ret) {
if (ntfs_umount(vol, FALSE) != 0) {
ERROR_WITH_ERRNO("Failed to unmount NTFS volume `%s'",