Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Avoid lock when child dies
[src/app-framework-binder.git]
/
src
/
afb-trace.c
diff --git
a/src/afb-trace.c
b/src/afb-trace.c
index
802015f
..
0de78da
100644
(file)
--- a/
src/afb-trace.c
+++ b/
src/afb-trace.c
@@
-67,7
+67,7
@@
/* struct for tags */
struct tag {
struct tag *next; /* link to the next */
/* struct for tags */
struct tag {
struct tag *next; /* link to the next */
- char tag[
1];
/* name of the tag */
+ char tag[
];
/* name of the tag */
};
/* struct for events */
};
/* struct for events */
@@
-1073,7
+1073,7
@@
static struct tag *trace_get_tag(struct afb_trace *trace, const char *name, int
if (!tag && alloc) {
/* creation if needed */
if (!tag && alloc) {
/* creation if needed */
- tag = malloc(sizeof * tag + strlen(name));
+ tag = malloc(sizeof * tag +
1 +
strlen(name));
if (tag) {
strcpy(tag->tag, name);
tag->next = trace->tags;
if (tag) {
strcpy(tag->tag, name);
tag->next = trace->tags;