diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-07-29 19:02:39 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2020-08-01 13:54:39 +0200 |
commit | c9b09a9249e6db802013c37a24af1fe45824cd3a (patch) | |
tree | 6369277764d776835409ff4e7def61de12a6c650 /scripts/recordmcount.pl | |
parent | kconfig: qconf: compile moc object separately (diff) | |
download | linux-c9b09a9249e6db802013c37a24af1fe45824cd3a.tar.xz linux-c9b09a9249e6db802013c37a24af1fe45824cd3a.zip |
kconfig: qconf: use delete[] instead of delete to free array
cppcheck reports "Mismatching allocation and deallocation".
$ cppcheck scripts/kconfig/qconf.cc
Checking scripts/kconfig/qconf.cc ...
scripts/kconfig/qconf.cc:1242:10: error: Mismatching allocation and deallocation: data [mismatchAllocDealloc]
delete data;
^
scripts/kconfig/qconf.cc:1236:15: note: Mismatching allocation and deallocation: data
char *data = new char[count + 1];
^
scripts/kconfig/qconf.cc:1242:10: note: Mismatching allocation and deallocation: data
delete data;
^
scripts/kconfig/qconf.cc:1255:10: error: Mismatching allocation and deallocation: data [mismatchAllocDealloc]
delete data;
^
scripts/kconfig/qconf.cc:1236:15: note: Mismatching allocation and deallocation: data
char *data = new char[count + 1];
^
scripts/kconfig/qconf.cc:1255:10: note: Mismatching allocation and deallocation: data
delete data;
^
Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again")
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/recordmcount.pl')
0 files changed, 0 insertions, 0 deletions