Fix for memory leak. And add forgotten break
Fix uninitialized
Prevent lock
Don't send -1 bytes. There is such check everythere. But if we add it in side funciton the logic will change
Add a check (reported by Coverity)
Merge branch 'master' of https://github.com/xor2003/toxcore

#
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.