simplify bayer_malloc
simplified bayer_strdup