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:
a3546d0
)
fix an incorrect free
author
Laurent Mazet
<mazet@softndesign.org>
Thu, 28 Dec 2023 21:49:50 +0000
(22:49 +0100)
committer
Laurent Mazet
<mazet@softndesign.org>
Thu, 28 Dec 2023 21:49:50 +0000
(22:49 +0100)
calc.c
patch
|
blob
|
blame
|
history
diff --git
a/calc.c
b/calc.c
index b2b3fbf689ac21f655dd99657f7ed38480c1a2dd..beae0c1dd098e1dc4ad11c947bb6b0a7d69c9250 100644
(file)
--- a/
calc.c
+++ b/
calc.c
@@
-211,13
+211,16
@@
int main (int argc, char *argv[])
if (mode) {
free (buffer);
+ buffer = NULL;
} else {
memset (buffer, 0, BUFFER_SIZE);
}
fflush (stdout);
}
- clean_read_line (buffer);
+ if (mode) {
+ clean_read_line (buffer);
+ }
free_format ();