Allocate space only for n_attrs number of pointers
free send buf
Merge pull request #9 from neurodrone/master

Allocate space only for n_attrs number of pointers
Merge pull request #11 from cychung/send-buf-leak-fix

free send buf
Merge remote-tracking branch 'upstream/master' into close-socket-fix
fix logic