Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean a new kb when the scan was stopped and the host has not been started. #494

Merged
merged 1 commit into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Don't detect MongoDB as a HTTP service. [#447](https://github.com/greenbone/openvas/pull/447)
- Set status finished and send a message if the port list is invalid. [#453](https://github.com/greenbone/openvas/pull/453)
- Fix format-truncation warning in GCC 8.2 and later. [#461](https://github.com/greenbone/openvas/pull/461)
- Clean the new kb when the scan was stopped and the host has not been started. [#494](https://github.com/greenbone/openvas/pull/494)

[Unreleased]: https://github.com/greenbone/openvas/compare/openvas-7.0...master

Expand Down
2 changes: 2 additions & 0 deletions src/attack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,12 +1300,14 @@ attack_network (struct scan_globals *globals, kb_t *network_kb)
host_str = gvm_host_value_str (host);
if (hosts_new (host_str, host_kb) < 0)
{
kb_delete (host_kb);
g_free (host_str);
goto scan_stop;
}

if (scan_is_stopped ())
{
kb_delete (host_kb);
g_free (host_str);
continue;
}
Expand Down