projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
kconfig: don't allocate n+1 elements in temporary array
[carl9170fw.git]
/
config
/
symbol.c
diff --git
a/config/symbol.c
b/config/symbol.c
index b664d6ed515ffe27e4a805734a5f51d839078da4..08d4401e646d8b043f1385cb81637ce66ea0184f 100644
(file)
--- a/
config/symbol.c
+++ b/
config/symbol.c
@@
-1010,7
+1010,7
@@
struct symbol **sym_re_search(const char *pattern)
continue;
if (regexec(&re, sym->name, 1, match, 0))
continue;
- if (cnt
+ 1
>= size) {
+ if (cnt >= size) {
void *tmp;
size += 16;
tmp = realloc(sym_match_arr, size * sizeof(struct sym_match *));