event: Replace malloc() + strcpy() with strdup()
event: Replace malloc() + strcpy() with strdup()

- Replace all the occurrence of malloc() + strcpy() with
  simpler strdup().
- Introduce malloc() failure check.
- Remove spaces.

Signed-off-by: Kamalesh Babulal <30b3129b1a1b0120e30fdc2f7d8e6560be5d0735@linux.vnet.ibm.com>
Cc: Vasant Hegde <a6d753843573f7bfed5075c1e875b0be8007a0ab@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <a6d753843573f7bfed5075c1e875b0be8007a0ab@linux.vnet.ibm.com>

kamalesh-babulal/libservicelog,kamalesh-babulal/libservicelog