The NULL-check isn't necessary

Since free(NULL) performs no operation
Set free()d variables to NULL

To prevent the double-free attack
changed Malloc() argument to unsigned int
Add NULL checks to wol.c functions