projects
/
platform
/
upstream
/
orc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e98a61f
)
orcc: Fix some memory leaks in the compiler
author
Sebastian Dröge
<sebastian@centricular.com>
Mon, 23 Jun 2014 17:14:18 +0000
(19:14 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Mon, 23 Jun 2014 17:14:18 +0000
(19:14 +0200)
tools/orcc.c
patch
|
blob
|
history
diff --git
a/tools/orcc.c
b/tools/orcc.c
index
9217def
..
d25b548
100644
(file)
--- a/
tools/orcc.c
+++ b/
tools/orcc.c
@@
-238,8
+238,10
@@
main (int argc, char *argv[])
}
n = orc_parse_full (code, &programs, &log);
+ free(code);
n_programs = n;
printf("%s", log);
+ free(log);
if (programs == NULL) {
printf("no programs\n");
@@
-412,6
+414,11
@@
main (int argc, char *argv[])
}
}
+ for(i=0;i<n;i++){
+ orc_program_free(programs[i]);
+ }
+ free(programs);
+
fclose (output);
if (error) {