Common library: fix error propagation with memory locker.