OSDN Git Service
(root)
/
jnethack
/
source.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4556b1a
)
fix leak memory on makedefs
author
SHIRAKATA Kentaro
<argrath@ub32.org>
Sun, 12 May 2019 17:19:41 +0000
(
02:19
+0900)
committer
SHIRAKATA Kentaro
<argrath@ub32.org>
Sat, 1 Jun 2019 12:52:53 +0000
(21:52 +0900)
This should not be mostly harmful.
util/makedefs.c
patch
|
blob
|
history
diff --git
a/util/makedefs.c
b/util/makedefs.c
index
ad89fe9
..
405868c
100644
(file)
--- a/
util/makedefs.c
+++ b/
util/makedefs.c
@@
-1900,10
+1900,13
@@
do_data()
}
if (*line > ' ') { /* got an entry name */
#else
- unsigned char uc;
- uc = *((unsigned char *)line);
- if (d_filter(line)) continue;
- if (uc > ' ') { /* got an entry name */
+ unsigned char uc;
+ if (d_filter(line)) {
+ free(line);
+ continue;
+ }
+ uc = *((unsigned char *)line);
+ if (uc > ' ') { /* got an entry name */
#endif
/* first finish previous entry */
if (line_cnt)