BUG: Fix Coverity issue 1081600: Use after free

Change-Id: I41f977018ba7e131c7ac9f4d7b59c058c11cde46
Merge topic 'coverity_cid_1081600'

cc37deab BUG: Fix Coverity issue 1081600: Use after free