char *speex_header_to_packet_fxd(SpeexHeader *header, int *size,SpeexHeader* alloc){ SpeexHeader *le_header; le_header = alloc;//(SpeexHeader*)speex_alloc(sizeof(SpeexHeader)); //...... } SpeexHeader alloc;//<-- allocated without maloc speex_header_to_packet_fxd(&header,size,&alloc);