Re: [PATCH 02/28] ASoC: soc-core: set component->debugfs_root NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 06, 2019 at 09:49:20AM -0500, Pierre-Louis Bossart wrote:
> >   {
> > +	if (!component->debugfs_root)
> > +		return;

> that test is redundant, it's safe to call debugfs_remove_recursive() without
> checking the argument (done internally).

It's not completely redundant...

> >   	debugfs_remove_recursive(component->debugfs_root);
> > +	component->debugfs_root = NULL;
> >   }

...with this, the two in combination add protection against a double
free.  Not 100% sure it's worth it but I queued the patch since I
couldn't strongly convince myself it's a bad idea.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux