projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26a9722
)
bluetooth: Fix memory leaks on error or when not pairing
author
Guillem Jover
<guillem@hadrons.org>
Sat, 1 Jun 2013 16:01:57 +0000
(18:01 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 14 Jun 2013 15:46:51 +0000
(17:46 +0200)
Warned-by: cppcheck
src/bluetooth.c
patch
|
blob
|
history
diff --git
a/src/bluetooth.c
b/src/bluetooth.c
index
28df08c
..
b446fd7
100644
(file)
--- a/
src/bluetooth.c
+++ b/
src/bluetooth.c
@@
-756,11
+756,14
@@
int __near_bluetooth_parse_oob_record(struct carrier_data *data,
}
ptr = ptr + oob->bt_name_len;
} else {
+ bt_eir_free(oob);
return -EINVAL;
}
- if (pair == FALSE)
+ if (pair == FALSE) {
+ bt_eir_free(oob);
return 0;
+ }
/* check and get the default adapter */
oob->def_adapter = g_strdup(bt_def_oob_data.def_adapter);