aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-21 15:38:03 -0500
committerTed Gould <ted@gould.cx>2012-08-21 15:38:03 -0500
commit41bd001d8789275f225d326797d97f16eb568c2a (patch)
tree6db23da94459b869a762d450655698a709bcb04f /src
parentc9d2ec7ce6b7e7973ef21291578225888a4472ad (diff)
downloadlibpam-x2go-41bd001d8789275f225d326797d97f16eb568c2a.tar.gz
libpam-x2go-41bd001d8789275f225d326797d97f16eb568c2a.tar.bz2
libpam-x2go-41bd001d8789275f225d326797d97f16eb568c2a.zip
If we don't fork, then clean up
Diffstat (limited to 'src')
-rw-r--r--src/pam-freerdp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 14a8f6b..9fc43ed 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -299,6 +299,8 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv
}
} else if (pid < 0) {
retval = PAM_SYSTEM_ERR;
+ close(socketfd);
+ free(buffer);
} else {
session_pid = pid;
}