src/java.base/windows/native/libjli/cmdtoargs.c

Print this page

        

@@ -191,10 +191,20 @@
 
 StdArg* JLI_GetStdArgs() {
     return stdargs;
 }
 
+void JLI_ReleaseStdArgs() {
+    StdArg* stdarg;
+    for (stdarg = stdargs; stdarg < stdargs + stdargc; ++stdarg) {
+        JLI_MemFree(stdarg->arg);
+    }
+    JLI_MemFree(stdargs);
+    stdargs = NULL;
+    stdargc = 0;
+}
+
 void JLI_CmdToArgs(char* cmdline) {
     int nargs = 0;
     StdArg* argv = NULL;
     jboolean wildcard = JNI_FALSE;
     char* src = cmdline;