fixing memory leak in MIDIEventCreate.

event is allocated memory which is not freed if malloc for buffer fails.
fixing memory leak in port.c

free port->name in function MIDIPortCreate before returning NULL if port->ports is NULL.
Update device.c

Fix for Out-of-bounds write error(Overrunning array)
Update clock.c

fix for integer overflow issue.
Update clock.c

fix for integer overflow issue.
Update osc.c

Initialize sockaddr_in variable to clear sin_zero field to avoid undifined behavior.
Socket system call's return is validated.
Fix of memory allocated ( for size 52 bytes) in case of error scenario not deleted.
Update applemidi.c

Initialize sockaddr_in variable to clear sin_zero field to avoid undifined behavior.
Socket system call's return is validated before the call of bind.
Merge pull request #6 from vchandla/master

fixing memory leaks and other issues reported by Coverity Prevent.

* out-of-bounds write errors
* unchecked socket() errors
* memset() on sockaddr_in
* integer overflows