Skip to content
Snippets Groups Projects
Unverified Commit cd05338c authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge branch 'custom-release-may-2018' into 3820-DontCloseVolumeSystemHandles

parents 97e48792 679311c8
No related branches found
No related tags found
No related merge requests found
......@@ -884,7 +884,12 @@ public static void closeImg(long imgHandle) {
* @param vsHandle pointer to volume system structure in sleuthkit
*/
public static void closeVs(long vsHandle) {
// closeVsNat(vsHandle); TODO JIRA-3829
// NOTE: We are not caching Volume System handles, so we
// can free it. One is allocated per VolumeSystem object.
// There is a chance that a vsPart handle exists in a Volume object,
// and that memory will be freed. But, the "TAG" checks in the native
// code should detect that it has been freed.
// closeVsNat(vsHandle); TODO JIRA-3829
}
/**
......
......@@ -79,14 +79,9 @@ public int read(byte[] buf, long offset, long len) throws TskCoreException {
@Override
public void close() {
if (volumeHandle != 0) {
synchronized (this) {
if (volumeHandle != 0) {
SleuthkitJNI.closeVs(volumeHandle);
volumeHandle = 0;
}
}
}
// there is nothing to free. The VolumeSystem structure
// in C++ contains this structure and will free it.
volumeHandle = 0;
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment