hold the shared_ptr during timer execution
hold the shared_ptr during timer execution

* weak_ptr.lock() returns a shared_ptr of the instance, however this
  shared_ptr is destroyed after implicitly converted to bool value in
  `if' condition statement.
* fix the issue by explicitly define a temporary variable.

Change-Id: I7fae512e3aa46173d1c07ceb06dc0c16268a48fb
Signed-off-by: Kevin Cai <7771192b74080b0349ce1991a9eaaeec64bf9e00@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/29974
Reviewed-by: Andrew Skowronski <96924f7a4dbe24093bb2da18f50a76703cb4a362@mozy.com>
Reviewed-by: Jenkins <49695b0f9c673fd73dab0ff3f84b5ced9302cc6a@mozy.com>
Reviewed-by: Jeremy Stanley <b3f594e10a9edcf5413cf1190121d45078c62290@mozy.com>

adfin/mordor,adfin/mordor,adfin/mordor,mtanski/mordor,mtanski/mordor,mozy/mordor,ccutrer/mordor,mozy/mordor,ccutrer/mordor,ccutrer/mordor,mozy/mordor,mtanski/mordor