[alsa-devel] question about sound/pci/ctxfi/ctpcm.c

Clemens Ladisch clemens at ladisch.de
Tue Nov 9 12:03:07 CET 2010


Julia Lawall wrote:
> [...]  One option would be to move the
> initializations downwards, since the intervening calls that use runtime
> don't use those fields.  The other would be to set provate_data to NULL
> after doing the free.  Any preference?

I notice that ct_atc_pcm_free_substream does not expect private_data to
be NULL, so only the first option would work.  Furthermore, apcm->timer
must not be NULL, so the initialization must be moved to the end of the
function.


Regards,
Clemens


More information about the Alsa-devel mailing list