st-hal: fix for kw issue use after free

Changes to fix the issue use after free.

Change-Id: I54f718c8d8e28e594e62d4863e929faa31c78bde
1 file changed