Skip to content

Commit a608b6a

Browse files
committed
kconfig: qconf: use delete[] instead of delete to free array (again)
Commit c9b09a9 ("kconfig: qconf: use delete[] instead of delete to free array") fixed two lines, but there is one more. (cppcheck does not report it for some reason...) This was detected by Clang. "make HOSTCXX=clang++ xconfig" reports the following: scripts/kconfig/qconf.cc:1279:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete data; ^ [] scripts/kconfig/qconf.cc:1239:15: note: allocated with 'new[]' here char *data = new char[count + 1]; ^ Fixes: c4f7398 ("kconfig: qconf: make debug links work again") Fixes: c9b09a9 ("kconfig: qconf: use delete[] instead of delete to free array") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
1 parent 856deb8 commit a608b6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/kconfig/qconf.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ void ConfigInfoView::clicked(const QUrl &url)
12761276
}
12771277

12781278
free(result);
1279-
delete data;
1279+
delete[] data;
12801280
}
12811281

12821282
void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event)

0 commit comments

Comments
 (0)