Plug up the lock lock leakage when exporting to a short buffer.
Plug up the lock lock leakage when exporting to a short buffer.

Reported by:	Alexander Leidinger
Submitted by:	mjg
MFC after:	1 week

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase