ASoC: Intel: check and clear runtime module pointer
ASoC: Intel: check and clear runtime module pointer

Add check runtime module pointers before freeing them, and clear
them to NULL after freed.

With this implemented, we can avoid NULL pointer dereference or
double free errors.

Signed-off-by: Jie Yang <ad2ec63dbc95ba363c35dd8116ca556a9d24614a@intel.com>
Signed-off-by: Mark Brown <b51b9a92386687a9ac927cebfa0f978adeb8cea5@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs