Soft'N'Design Software
/
projects
/
calc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f50ed10
)
correct a memory leak
author
Mazet Laurent
<mazet@softndesign.org>
Thu, 2 Feb 2023 00:09:45 +0000
(
01:09
+0100)
committer
Mazet Laurent
<mazet@softndesign.org>
Thu, 2 Feb 2023 00:09:45 +0000
(
01:09
+0100)
parser.c
patch
|
blob
|
blame
|
history
diff --git
a/parser.c
b/parser.c
index e1e79268ef2ca11249140ad955d6651d0b4d3287..9e7e51013e3a050f04a8c48c9e28aa1e971be542 100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-826,8
+826,8
@@
double call (int id, int nbops, element_t **ops)
double *tmp = (double *) callocordie (nbops, sizeof (double));
memcpy (tmp, storage, storage_size * sizeof (double));
free (storage);
- storage = tmp;
- storage_size = nbops;
+
(programs + n)->storage =
storage = tmp;
+
(programs + n)->storage_size =
storage_size = nbops;
}
for (i = 0; i < nbops; i++) {
double val = evaluate_element (ops[i], 0);