Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b85aae78
Commit
b85aae78
authored
May 09, 2018
by
antirez
Browse files
Fix rdb.c dictionary iterator release in 2 more places.
parent
cd87b3c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rdb.c
View file @
b85aae78
...
...
@@ -772,7 +772,10 @@ ssize_t rdbSaveObject(rio *rdb, robj *o) {
dictIterator
*
di
=
dictGetIterator
(
set
);
dictEntry
*
de
;
if
((
n
=
rdbSaveLen
(
rdb
,
dictSize
(
set
)))
==
-
1
)
return
-
1
;
if
((
n
=
rdbSaveLen
(
rdb
,
dictSize
(
set
)))
==
-
1
)
{
dictReleaseIterator
(
di
);
return
-
1
;
}
nwritten
+=
n
;
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
...
...
@@ -842,7 +845,10 @@ ssize_t rdbSaveObject(rio *rdb, robj *o) {
dictIterator
*
di
=
dictGetIterator
(
o
->
ptr
);
dictEntry
*
de
;
if
((
n
=
rdbSaveLen
(
rdb
,
dictSize
((
dict
*
)
o
->
ptr
)))
==
-
1
)
return
-
1
;
if
((
n
=
rdbSaveLen
(
rdb
,
dictSize
((
dict
*
)
o
->
ptr
)))
==
-
1
)
{
dictReleaseIterator
(
di
);
return
-
1
;
}
nwritten
+=
n
;
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
...
...
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