Fix uninitialized variable in Admin::listPolicies() 82/33082/1
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Fri, 2 Jan 2015 19:32:12 +0000 (20:32 +0100)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Fri, 2 Jan 2015 19:32:12 +0000 (20:32 +0100)
commit36efc47cbf7dfa67e7c01e3efebdddf8d0dcfd30
tree43f8e436ced9fbaaa42855c5712002ec293866b8
parent75bb6f9f62650222c745b161d4d866e4d0c8bc65
Fix uninitialized variable in Admin::listPolicies()

struct cynara_admin_policy **policies was uninitialized.
Normally it should be filled with cynara_admin_list_policies() call.
However, when that function failes, it leaves policies unaffected.
If this pointer is not NULL then it is being freed after it is used
to construct vector of policies.

Change-Id: Iff469205035a5240eee64ec87ea724b83577d105
tests/cynara-tests/common/cynara_test_admin.cpp