lib: Fixed stdinit bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 14 Jul 2013 06:05:49 +0000 (08:05 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 14 Jul 2013 06:05:49 +0000 (08:05 +0200)
lib/cf.c

index 61b3915..2ca910a 100644 (file)
--- a/lib/cf.c
+++ b/lib/cf.c
@@ -320,7 +320,8 @@ static int stdhandle(struct child *ch, struct hthead *req, int fd, void (*chinit
        
        for(i = 0; sd->envp[i]; i += 2)
            putenv(sprintf2("%s=%s", sd->envp[i], sd->envp[i + 1]));
-       chinit(data);
+       if(chinit != NULL)
+           chinit(data);
     }
     
     if(sd->type == CH_SOCKET) {