diff --git a/NmapOps.cc b/NmapOps.cc index fc4cb1bdd..a3f1dab4f 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -459,7 +459,7 @@ void NmapOps::ValidateOptions() { /* Make sure nmap.registry.args is available (even if it's empty) */ if (!scriptargs) - scriptargs = strdup(""); + scriptargs = ""; } void NmapOps::setMaxOSTries(int mot) { diff --git a/NmapOps.h b/NmapOps.h index 9bc5ea05e..c85ccc26b 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -319,7 +319,7 @@ class NmapOps { #ifndef NOLUA int script; - char *scriptargs; + const char *scriptargs; int scriptversion; int scripttrace; int scriptupdatedb;