summaryrefslogtreecommitdiff
path: root/src/dumm/guest.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-12-05 16:15:54 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-12-05 16:15:54 +0000
commitc7f1b0530b85bc7654e68992f25ed8ced5d0a80d (patch)
tree861798cd7da646014ed6919766b053099646710d /src/dumm/guest.c
parent8b80ab5a6950ce6515f477624794defd7531642a (diff)
downloadvyos-strongswan-c7f1b0530b85bc7654e68992f25ed8ced5d0a80d.tar.gz
vyos-strongswan-c7f1b0530b85bc7654e68992f25ed8ced5d0a80d.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.9)
Diffstat (limited to 'src/dumm/guest.c')
-rw-r--r--src/dumm/guest.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/dumm/guest.c b/src/dumm/guest.c
index aed2a3e18..014a9113f 100644
--- a/src/dumm/guest.c
+++ b/src/dumm/guest.c
@@ -576,11 +576,22 @@ static private_guest_t *guest_create_generic(char *parent, char *name,
if (*parent == '/' || getcwd(cwd, sizeof(cwd)) == NULL)
{
- asprintf(&this->dirname, "%s/%s", parent, name);
+ if (asprintf(&this->dirname, "%s/%s", parent, name) < 0)
+ {
+ this->dirname = NULL;
+ }
}
else
{
- asprintf(&this->dirname, "%s/%s/%s", cwd, parent, name);
+ if (asprintf(&this->dirname, "%s/%s/%s", cwd, parent, name) < 0)
+ {
+ this->dirname = NULL;
+ }
+ }
+ if (this->dirname == NULL)
+ {
+ free(this);
+ return NULL;
}
if (create)
{