aboutsummaryrefslogtreecommitdiff
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
commitf41121dfd7f7ee9cb10d552abe6e3f81e75fbd5f (patch)
tree6db23da94459b869a762d450655698a709bcb04f
parent1dd64bd6eff28e9b0e9270a9462db0d02a4e9774 (diff)
downloadlibpam-freerdp2-f41121dfd7f7ee9cb10d552abe6e3f81e75fbd5f.tar.gz
libpam-freerdp2-f41121dfd7f7ee9cb10d552abe6e3f81e75fbd5f.tar.bz2
libpam-freerdp2-f41121dfd7f7ee9cb10d552abe6e3f81e75fbd5f.zip
If we don't fork, then clean up
-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;
}