diff options
author | jcid <devnull@localhost> | 2008-01-08 13:09:28 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-01-08 13:09:28 +0100 |
commit | 445f55b9280aba6357488e2e466d71697f77e400 (patch) | |
tree | 032a8289b18f6eb0cfaf10c9bf93d457af91b9c7 /src/cookies.c | |
parent | bb5ae3f2844122e4f2878119e36ca8727cf74b9b (diff) |
+ - Fixed a segfault in cookies.c when no .dillo directory exists.
Diffstat (limited to 'src/cookies.c')
-rw-r--r-- | src/cookies.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cookies.c b/src/cookies.c index f6002842..63b98837 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -101,8 +101,10 @@ static FILE *Cookies_fopen(const char *filename, char *init_str) } } - /* set close on exec */ - fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD)); + if (F_in) { + /* set close on exec */ + fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD)); + } return F_in; } |