Commit a608b6a6 authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: qconf: use delete[] instead of delete to free array (again)

Commit c9b09a92 ("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: c4f7398b ("kconfig: qconf: make debug links work again")
Fixes: c9b09a92 ("kconfig: qconf: use delete[] instead of delete to free array")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 856deb86
......@@ -1276,7 +1276,7 @@ void ConfigInfoView::clicked(const QUrl &url)
}
free(result);
delete data;
delete[] data;
}
void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment