Skip to content
Snippets Groups Projects
Commit 9c8d997e authored by Ann Priestman's avatar Ann Priestman
Browse files

Add write lock in save()

parent c7ad6ad9
No related branches found
No related tags found
No related merge requests found
...@@ -1101,6 +1101,7 @@ public void save() throws TskCoreException { ...@@ -1101,6 +1101,7 @@ public void save() throws TskCoreException {
SleuthkitCase.CaseDbConnection connection = getSleuthkitCase().getConnection(); SleuthkitCase.CaseDbConnection connection = getSleuthkitCase().getConnection();
Statement statement = null; Statement statement = null;
getSleuthkitCase().acquireSingleUserCaseWriteLock();
try { try {
statement = connection.createStatement(); statement = connection.createStatement();
connection.executeUpdate(statement, queryStr); connection.executeUpdate(statement, queryStr);
...@@ -1113,6 +1114,7 @@ public void save() throws TskCoreException { ...@@ -1113,6 +1114,7 @@ public void save() throws TskCoreException {
} finally { } finally {
closeStatement(statement); closeStatement(statement);
connection.close(); connection.close();
getSleuthkitCase().releaseSingleUserCaseWriteLock();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment