pass: Put resource properly to prevent memory leak 10/138110/3
authorDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 11 Jul 2017 05:54:57 +0000 (14:54 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 12 Jul 2017 01:13:44 +0000 (10:13 +0900)
commit46d60740fb4bd8593096e75c4e25ffe02362d0b8
tree467eb85c60221c674972a9ea390b4385a62e09f9
parentde2f62ea9370c352081e80edbdb5160fb3c1a6d1
pass: Put resource properly to prevent memory leak

There are two cases which can cause memory leak during pass init/exit:
 1. When resource initialization is failed, it just skips that
    resource without putting it.
 2. In the case of failure while freeing resources, it is also skipped
    putting that resource.

To prevent memory leak, the resource will be put on both cases.

Change-Id: I4008b7785e0dbbc318b38eb573bf739e0a848b6c
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/pass/pass.c