[#1376] fixed memory leak in rsFilePut and sockComm as well as conditional jumps on uninitialized memory in libnative