angle: MacroExpand leaks in, in->args, in->args[] for various failure cases

RESOLVED WORKSFORME

Status

()

--
minor
RESOLVED WORKSFORME
8 years ago
a month ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

(Blocks: 1 bug, {coverity, memory-leak})

Trunk
coverity, memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
895 int MacroExpand(int atom, yystypepp * yylvalpp)

898     MacroInputSrc       *in;

921     in = malloc(sizeof(*in));
927     if (sym->details.mac.args) {
929                 if (token != '(') {

leaks in:
932             return 0;
934         in->args = malloc(in->mac->argc * sizeof(TokenStream *));
935         for (i=0; i<in->mac->argc; i++)
936             in->args[i] = NewTokenStream("macro arg", 0);
938         do{
940                         while(1) {
942                 if (token <= 0) {

leaks in, in->args, in->args[]:
948                     return 1;
972         } else if (token != ')') {
980             if (token <= 0) {

leaks in, in->args, in->args[]:
986                 return 1;
(Assignee)

Comment 1

8 years ago
Created attachment 482485 [details] [diff] [review]
i think this is right
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Summary: MacroExpand leaks in, in->args, in->args[] for various failure cases → angle: MacroExpand leaks in, in->args, in->args[] for various failure cases
Needs to be filed at http://code.google.com/p/angleproject/ -- please file further ANGLE bugs there.
https://code.google.com/p/angleproject/issues/detail?id=63 is marked as fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.