aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2008-12-04 04:34:49 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2008-12-04 04:34:49 +0000
commit9c674e7214c010c972f2afe169922b0217590c14 (patch)
treee6322c773cad8cfb692e145676cabe9ccfbaddbd /src
parent04409bbb74fd599265e26f756a4b1c58ea6fb160 (diff)
downloadstrongswan-9c674e7214c010c972f2afe169922b0217590c14.tar.bz2
strongswan-9c674e7214c010c972f2afe169922b0217590c14.tar.xz
fixed refactoring error in openac
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/plugins/x509/x509_ac.c4
-rwxr-xr-xsrc/openac/openac.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/x509/x509_ac.c b/src/libstrongswan/plugins/x509/x509_ac.c
index 257a903e4..fbb7707a1 100644
--- a/src/libstrongswan/plugins/x509/x509_ac.c
+++ b/src/libstrongswan/plugins/x509/x509_ac.c
@@ -409,7 +409,7 @@ static bool parse_certificate(private_x509_ac_t *this)
sig_alg = asn1_parse_algorithmIdentifier(object, level, NULL);
break;
case AC_OBJ_SERIAL_NUMBER:
- this->serialNumber = object;
+ this->serialNumber = chunk_clone(object);
break;
case AC_OBJ_NOT_BEFORE:
this->notBefore = asn1_to_time(&object, ASN1_GENERALIZEDTIME);
@@ -923,6 +923,7 @@ static void destroy(private_x509_ac_t *this)
ietfAttr_list_destroy(this->charging);
ietfAttr_list_destroy(this->groups);
+ free(this->serialNumber.ptr);
free(this->encoding.ptr);
free(this);
}
@@ -956,6 +957,7 @@ static private_x509_ac_t *create_empty(void)
/* initialize */
this->encoding = chunk_empty;
+ this->serialNumber = chunk_empty;
this->holderSerial = chunk_empty;
this->holderIssuer = NULL;
this->entityName = NULL;
diff --git a/src/openac/openac.c b/src/openac/openac.c
index 999447d9a..3d25160d5 100755
--- a/src/openac/openac.c
+++ b/src/openac/openac.c
@@ -540,7 +540,6 @@ int main(int argc, char **argv)
BUILD_SIGNING_CERT, signerCert,
BUILD_SIGNING_KEY, signerKey,
BUILD_END);
- free(serial.ptr);
if (!attr_cert)
{
goto end;