summaryrefslogtreecommitdiff
path: root/src/dumm/guest.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-12-05 16:44:41 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-12-05 16:44:41 +0000
commit2db1ef4ac8928944958712923b9c89c263a337d2 (patch)
tree700043d9d97b7e7ba344b448918728af0a8be8d1 /src/dumm/guest.c
parent5dc75410286b0e3a16845b44dd696ba0f40df573 (diff)
downloadvyos-strongswan-2db1ef4ac8928944958712923b9c89c263a337d2.tar.gz
vyos-strongswan-2db1ef4ac8928944958712923b9c89c263a337d2.zip
- Updated to new upstream.
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)
{