Compacted chunk creation in ita_attr_command constructor
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 30 Aug 2014 10:35:08 +0000 (12:35 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 5 Oct 2014 10:55:38 +0000 (12:55 +0200)
src/libimcv/ita/ita_attr_command.c

index 9692e1f..08a9efa 100644 (file)
@@ -91,8 +91,7 @@ METHOD(pa_tnc_attr_t, build, void,
        {
                return;
        }
        {
                return;
        }
-       this->value = chunk_create(this->command, strlen(this->command));
-       this->value = chunk_clone(this->value);
+       this->value = chunk_clone(chunk_from_str(this->command));
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,