On Thu, 28 Apr 2016 10:48:36 +0200, Jaroslav Kysela wrote: > > Dne 28.4.2016 v 10:41 mengdong.lin@xxxxxxxxxxxxxxx napsal(a): > > priv_data_size = ref->data->size; > > + elem->obj = realloc(elem->obj, > > + elem->size + priv_data_size); > > + if (!elem->obj) > > + return -ENOMEM; > > This causes a memory leak when realloc fails. You should free the > original pointer when realloc() fails. Right, and the bug (the leak) has been already present before the patch... thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel