F-4364: override releaseNativeStruct in Hmac to serialize native free
parent
25b4ceb8cf
commit
2abd0fd33a
|
|
@ -212,6 +212,18 @@ public class Hmac extends NativeStruct {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Release native Hmac structure.
|
||||
* Synchronized on this object so a concurrent release cannot free
|
||||
* the native struct while another synchronized method is using it.
|
||||
*/
|
||||
@Override
|
||||
public synchronized void releaseNativeStruct() {
|
||||
synchronized (pointerLock) {
|
||||
super.releaseNativeStruct();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform HMAC update operation
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue