MB-8804: free(NULL) is legal according to the C spec

Change-Id: I1b328d0b6bf7ed88e354a7e6b8d04dc2accca665