diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 107ba3ed5440d1f2c50b32d96d5a6b3ad3fa3a63..953517a732983cc52d7d2084c286a371fcf64c33 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2376,8 +2376,11 @@ static int soc_tplg_link_elems_load(struct soc_tplg *tplg, } ret = soc_tplg_link_config(tplg, _link); - if (ret < 0) + if (ret < 0) { + if (!abi_match) + kfree(_link); return ret; + } /* offset by version-specific struct size and * real priv data size