summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Janc <szymon@janc.net.pl>2012-06-06 21:38:23 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-07 23:34:45 +0800
commit1da4a66054272a628c08907be257a115016a29ae (patch)
tree21f3fef9863c28022d674cc55a0c4704e6b04a23
parent283b4b7d694f276e421b0db823a4905983699255 (diff)
downloadbluez-1da4a66054272a628c08907be257a115016a29ae.tar.gz
btmgmt: Fix use after free in mgmt_check_pending
Break loop when pending command was found and callback called.
-rw-r--r--mgmt/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mgmt/main.c b/mgmt/main.c
index 6e3507153..b2d6c3c48 100644
--- a/mgmt/main.c
+++ b/mgmt/main.c
@@ -141,6 +141,7 @@ static void mgmt_check_pending(int mgmt_sk, uint16_t op, uint16_t index,
c->cb(mgmt_sk, op, index, status, data, len, c->user_data);
free(c);
+ break;
}
}