fix uninitialized variable in a test
Fix uninitialized variable (coverity scan)
Fix the resource leak on error (coverity scan)
Fix the wrong sizeof in sendto (coverity scan)
Fix the null pointer dereference (coverity scan)
Missing break (coverity scan)
Fix unchecked pointer dereference (coverity scan)