Check lock return values
Check lock return values

This will inform us when some of the locks fails.
It can help us with debugging #1199.

redhatrises/openscap,OpenSCAP/openscap,OpenSCAP/openscap,redhatrises/openscap,OpenSCAP/openscap,OpenSCAP/openscap,redhatrises/openscap,OpenSCAP/openscap,redhatrises/openscap,redhatrises/openscap,OpenSCAP/openscap,redhatrises/openscap