Fix some memory leaks in unedat.cpp.
Fix variable typos in unedat.cpp
Also fixed possible uninitialized variable usage. Initializes length to zero.