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
ddfaca9d
Commit
ddfaca9d
authored
Mar 04, 2010
by
antirez
Browse files
A fix for an invalid access when VM is disabled
parent
947efa8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
ddfaca9d
...
@@ -3536,7 +3536,7 @@ static void setGenericCommand(redisClient *c, int nx) {
...
@@ -3536,7 +3536,7 @@ static void setGenericCommand(redisClient *c, int nx) {
* to overwrite the old. So we delete the old key in the database.
* to overwrite the old. So we delete the old key in the database.
* This will also make sure that swap pages about the old object
* This will also make sure that swap pages about the old object
* will be marked as free. */
* will be marked as free. */
if
(
deleteIfSwapped
(
c
->
db
,
c
->
argv
[
1
]))
if
(
server
.
vm_enabled
&&
deleteIfSwapped
(
c
->
db
,
c
->
argv
[
1
]))
incrRefCount
(
c
->
argv
[
1
]);
incrRefCount
(
c
->
argv
[
1
]);
dictReplace
(
c
->
db
->
dict
,
c
->
argv
[
1
],
c
->
argv
[
2
]);
dictReplace
(
c
->
db
->
dict
,
c
->
argv
[
1
],
c
->
argv
[
2
]);
incrRefCount
(
c
->
argv
[
2
]);
incrRefCount
(
c
->
argv
[
2
]);
...
...
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