Commit: c0ad77f7e8cfb9bbc93c13a569e756b1ea3daa20
Parent: 6df190c813b5a989c98385ea999247af1ba64a53
Author: Slawomir Bochenski <lkslawek@gmail.com>
Committer: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-12-04 23:48:46
Tree: 44eed588b8f93239742ebafe28f77497098e4ce6

obexd: Fix crash on error in agent_request_reply This fixes regression introduced by 63becff48820dc50a30ae495e286e858a886d9dd, causing obex-client to crash in cases of e.g. remote site rejecting pushed file. The req->function set by user of agent API may request agent object deletion. This in turn checks if agent->pending is set and if it is, it tries to cancel the pending call and frees pending call data. As at this point we are already handling call response and we are going to free this pending call data, agent->pending can be set to NULL prior to calling req->function, thus preventing premature freeing of later dereferenced req.

Diffstat

M obexd/client/agent.c | 3 ++-

1 files changed, 2 insertions(+), 1 deletions(-)

View Full Diff | Patch