OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2a07d4
)
Fix possible null pointer deference.
author
Luiz Augusto von Dentz
<luiz.dentz@openbossa.org>
Wed, 1 Apr 2009 17:18:15 +0000
(14:18 -0300)
committer
Luiz Augusto von Dentz
<luiz.dentz@openbossa.org>
Wed, 1 Apr 2009 17:18:15 +0000
(14:18 -0300)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
447070c
..
2ad0f44
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-1533,14
+1533,18
@@
static void bonding_request_free(struct bonding_req *bonding, gboolean close)
}
device = bonding->device;
+ g_free(bonding);
- if (device && device->agent) {
- agent_destroy(device->agent, FALSE);
- device->agent = NULL;
- }
+ if (!device)
+ return;
device->bonding = NULL;
- g_free(bonding);
+
+ if (!device->agent)
+ return;
+
+ agent_destroy(device->agent, FALSE);
+ device->agent = NULL;
}
static void device_set_paired(struct btd_device *device, gboolean value)