summaryrefslogtreecommitdiff
path: root/overlay
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-02-01 17:28:33 +0000
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-02-01 17:52:27 +0000
commita20a69e25a18ec63236633b804d89cc0c0cea259 (patch)
tree56aa50f632d658cc1a61a1aecdcd2fa02307c131 /overlay
parent812eeedddc2747c2025c6975d0a5fad3cd11c94f (diff)
overlay: fix invalid pointer access
The 'v' variable isn't defined in this part of the 'TracepointFmt' rule but because of the way the generator produces code (one function per rule) it doesn't realize we're accessing a variable from a different case of the rule and this doesn't lead to a C compiler error on undefined variable. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r--overlay/tracepoint_format.leg2
1 files changed, 1 insertions, 1 deletions
diff --git a/overlay/tracepoint_format.leg b/overlay/tracepoint_format.leg
index 0db9a55f..5503e1cc 100644
--- a/overlay/tracepoint_format.leg
+++ b/overlay/tracepoint_format.leg
@@ -1,5 +1,5 @@
TracepointFmt =
- 'name' ':' Space n:PropertyName EndLine { free(v.string); }
+ 'name' ':' Space n:PropertyName EndLine { free(n.string); }
'ID:' Space v:Number EndLine { yy->ctx.tp->event_id = v.integer; }
'format:' EndLine
Field+