OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e0ede7
)
Make osi_strdup report allocation size correctly
author
Zach Johnson
<zachoverflow@google.com>
Thu, 28 Aug 2014 03:26:00 +0000
(20:26 -0700)
committer
Andre Eisenbach
<eisenbach@google.com>
Mon, 16 Mar 2015 23:51:30 +0000
(16:51 -0700)
osi/src/allocator.c
patch
|
blob
|
history
diff --git
a/osi/src/allocator.c
b/osi/src/allocator.c
index
c0bf79b
..
e0b84b8
100644
(file)
--- a/
osi/src/allocator.c
+++ b/
osi/src/allocator.c
@@
-23,7
+23,7
@@
char *osi_strdup(const char *str) {
char *ret = strdup(str);
- allocation_tracker_notify_alloc(ret, strlen(ret)
);
+ allocation_tracker_notify_alloc(ret, strlen(ret)
+ 1); // + 1 for the null terminator
return ret;
}