diff --git a/nse_main.cc b/nse_main.cc index f2e0db1d8..eca4f4497 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -279,6 +279,8 @@ int process_mainloop(lua_State* l) { } } + progress.endTask(NULL, NULL); + return SCRIPT_ENGINE_SUCCESS; } diff --git a/nse_pcrelib.cc b/nse_pcrelib.cc index 95d402e96..f6b68d5e0 100644 --- a/nse_pcrelib.cc +++ b/nse_pcrelib.cc @@ -110,7 +110,6 @@ static const unsigned char *Lpcre_maketables(lua_State *L, int stackpos) tables = pcre_maketables(); /* make tables with new locale */ (void)setlocale(LC_CTYPE, old_locale); /* restore the old locale */ - free(old_locale); free(locale); return tables; } @@ -158,7 +157,7 @@ static void Lpcre_getargs(lua_State *L, pcre2 **pud, const char **text, size_t *text_len) { *pud = (pcre2 *)luaL_checkudata(L, 1, pcre_handle); - if(*pud != NULL) + if(*pud == NULL) (void)luaL_argerror(L, 1, ("compiled regexp expected")); *text = luaL_checklstring(L, 2, text_len); } diff --git a/output.cc b/output.cc index 0b159c052..03eccc840 100644 --- a/output.cc +++ b/output.cc @@ -1409,6 +1409,11 @@ void printosscanoutput(Target *currenths) { distance = currenths->distance; log_write(LOG_XML, ""); + if (FPR->osscan_opentcpport > 0) { + log_write(LOG_XML, + "\n", + FPR->osscan_opentcpport); + } if (FPR->osscan_closedtcpport > 0) { log_write(LOG_XML, "\n",