aboutsummaryrefslogtreecommitdiff
path: root/fcgi-cgi.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-11-11 16:21:20 +0100
committerStefan Bühler <stbuehler@web.de>2009-11-11 16:21:20 +0100
commit04dbbb6470f6a04714a3d4b80939b32c2849892e (patch)
tree470cf056f39c21a6279ad94a94ad8a0b456e8d17 /fcgi-cgi.c
parentd509fbb142250a526e4f89c478a8b43c4f9114df (diff)
downloadfcgi-cgi-04dbbb6470f6a04714a3d4b80939b32c2849892e.tar.gz
fcgi-cgi-04dbbb6470f6a04714a3d4b80939b32c2849892e.zip
Fix chdir() patchv0.1.2
Diffstat (limited to 'fcgi-cgi.c')
-rw-r--r--fcgi-cgi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgi-cgi.c b/fcgi-cgi.c
index 8272b92..234170b 100644
--- a/fcgi-cgi.c
+++ b/fcgi-cgi.c
@@ -341,7 +341,7 @@ static void fcgi_cgi_child_start(fcgi_cgi_child *cld, const gchar *path) {
/* try changing the directory. don't care about memleaks, execve() coming soon :) */
{
char *dir = strdup(path), *sep;
- if (NULL == (sep = strrchr(path, '/'))) {
+ if (NULL == (sep = strrchr(dir, '/'))) {
chdir("/");
} else {
*sep = '\0';