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
3c9b8172
Commit
3c9b8172
authored
Jan 27, 2017
by
Jan-Erik Rediger
Browse files
Don't divide by zero
Previously Redis crashed on `MEMORY DOCTOR` when it has no slaves attached. Fixes #3783
parent
2e4f53a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/object.c
View file @
3c9b8172
...
...
@@ -951,7 +951,7 @@ sds getMemoryDoctorReport(void) {
}
/* Slaves using more than 10 MB each? */
if
(
mh
->
clients_slaves
/
numslaves
>
(
1024
*
1024
*
10
))
{
if
(
numslaves
>
0
&&
mh
->
clients_slaves
/
numslaves
>
(
1024
*
1024
*
10
))
{
big_slave_buf
=
1
;
num_reports
++
;
}
...
...
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