producer&consumer with malloc error