]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed issue introduced in 2.1_rc14 that may cause a
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 19 Nov 2008 18:07:52 +0000 (18:07 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 19 Nov 2008 18:07:52 +0000 (18:07 +0000)
segfault when a --plugin module is used.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3524 e7ae566f-a301-0410-adde-c780ea21d3b5

misc.c

diff --git a/misc.c b/misc.c
index 5f890884ee3877cfcef1ddd26c713d07c6d61452..b57e83a1f0d3ec2a314aecb2b838a1e0ef3cb85f 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -1863,8 +1863,8 @@ argv_clone (const struct argv *a, const size_t headroom)
     {
       for (i = 0; i < a->argc; ++i)
        argv_append (&r, string_alloc (a->argv[i], NULL));
+      r.system_str = string_alloc (a->system_str, NULL);
     }
-  r.system_str = string_alloc (a->system_str, NULL);
   return r;
 }