]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
soc: ti: ti-pat: Fix leak of sg_table memory on detach
authorAndrew F. Davis <afd@ti.com>
Fri, 15 Nov 2019 20:12:08 +0000 (15:12 -0500)
committerTero Kristo <t-kristo@ti.com>
Mon, 25 Nov 2019 08:21:06 +0000 (10:21 +0200)
commite2d64a2abc2b07caa3beca3b8c8880d554ed7206
tree941d4cbb85bf85dcb1bd506b4b215a90d855c7ac
parent231127b69e76f247ba8e91815213a101e1237581
soc: ti: ti-pat: Fix leak of sg_table memory on detach

When detaching and in the case of error when attaching we free the
allocated sg_table memory but not the allocated contents of the table.
Fix this here

Fixes: 1f105f47637b ("soc: ti: Add Support for the TI Page-based Address Translator (PAT)")
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
drivers/soc/ti/ti-pat.c