summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/nm/nm_creds.c
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
commit568905f488e63e28778f87ac0e38d845f45bae79 (patch)
treed9969a147e36413583ff4bc75542d34c955f8823 /src/libcharon/plugins/nm/nm_creds.c
parentf73fba54dc8b30c6482e1e8abf15bbf455592fcd (diff)
downloadvyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.tar.gz
vyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.zip
Imported Upstream version 4.5.1
Diffstat (limited to 'src/libcharon/plugins/nm/nm_creds.c')
-rw-r--r--src/libcharon/plugins/nm/nm_creds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcharon/plugins/nm/nm_creds.c b/src/libcharon/plugins/nm/nm_creds.c
index 638787019..ea98c056d 100644
--- a/src/libcharon/plugins/nm/nm_creds.c
+++ b/src/libcharon/plugins/nm/nm_creds.c
@@ -400,7 +400,7 @@ static void set_username_password(private_nm_creds_t *this, identification_t *id
DESTROY_IF(this->user);
this->user = id->clone(id);
free(this->pass);
- this->pass = password ? strdup(password) : NULL;
+ this->pass = strdupnull(password);
this->lock->unlock(this->lock);
}
@@ -411,7 +411,7 @@ static void set_key_password(private_nm_creds_t *this, char *password)
{
this->lock->write_lock(this->lock);
free(this->keypass);
- this->keypass = password ? strdup(password) : NULL;
+ this->keypass = strdupnull(password);
this->lock->unlock(this->lock);
}
@@ -423,7 +423,7 @@ static void set_pin(private_nm_creds_t *this, chunk_t keyid, char *pin)
this->lock->write_lock(this->lock);
free(this->keypass);
free(this->keyid.ptr);
- this->keypass = pin ? strdup(pin) : NULL;
+ this->keypass = strdupnull(pin);
this->keyid = chunk_clone(keyid);
this->lock->unlock(this->lock);
}