Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4aec2ec8
Commit
4aec2ec8
authored
Mar 04, 2011
by
antirez
Browse files
AOF file descriptor leak fixed
parent
15db4aa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
4aec2ec8
...
...
@@ -220,8 +220,10 @@ int loadAppendOnlyFile(char *filename) {
int
appendonly
=
server
.
appendonly
;
long
loops
=
0
;
if
(
redis_fstat
(
fileno
(
fp
),
&
sb
)
!=
-
1
&&
sb
.
st_size
==
0
)
if
(
fp
&&
redis_fstat
(
fileno
(
fp
),
&
sb
)
!=
-
1
&&
sb
.
st_size
==
0
)
{
fclose
(
fp
);
return
REDIS_ERR
;
}
if
(
fp
==
NULL
)
{
redisLog
(
REDIS_WARNING
,
"Fatal error: can't open the append log file for reading: %s"
,
strerror
(
errno
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment