summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-10-21 10:49:40 +0800
committerChengwei Yang <chengwei.yang@intel.com>2013-10-21 10:52:01 +0800
commit47bb4c318a05e5e7f7eab7795d86fb2ffd17f525 (patch)
tree2058659efbaf9ba360b6c69a0076b09cd1604717
parent994d96ed725362c2d21a32e786283e84261318d4 (diff)
downloadaul-1-47bb4c318a05e5e7f7eab7795d86fb2ffd17f525.tar.gz
aul-1-47bb4c318a05e5e7f7eab7795d86fb2ffd17f525.tar.bz2
aul-1-47bb4c318a05e5e7f7eab7795d86fb2ffd17f525.zip
Init local variable to avoid crash if loading pkg info failedsubmit/tizen/20131021.084146accepted/tizen/20131021.162941accepted/tizen/20131021.091044
The uninitialized local variable will cause amd crash (coredump) at g_hash_table_foreach since the junk pointer in amd.af, this is triggered by pkg info load failure from pkgmgr. Change-Id: I1145c11dc88030b40834de769de1443786ca5dda Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
-rwxr-xr-xam_daemon/amd_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/am_daemon/amd_main.c b/am_daemon/amd_main.c
index 6135d69e..75bf298c 100755
--- a/am_daemon/amd_main.c
+++ b/am_daemon/amd_main.c
@@ -246,7 +246,10 @@ static void _start_services(struct amdmgr *amd)
static int __init()
{
- struct amdmgr amd;
+ struct amdmgr amd = {
+ .af = NULL,
+ .cg = NULL
+ };
ecore_init();
evas_init();