projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44262c5
)
memory leak introduced in the latest big changes fixed
author
antirez
<antirez@gmail.com>
Thu, 3 Jun 2010 16:22:15 +0000
(18:22 +0200)
committer
antirez
<antirez@gmail.com>
Thu, 3 Jun 2010 16:22:15 +0000
(18:22 +0200)
redis.c
patch
|
blob
|
blame
|
history
diff --git
a/redis.c
b/redis.c
index 35b9ba252c69070f2abe0966f130828d0460f846..e67ba20d74a603cce9a30b2534df560f1369187e 100644
(file)
--- a/
redis.c
+++ b/
redis.c
@@
-9403,7
+9403,9
@@
static int vmSwapOneObject(int usethreads) {
/* Swap it */
if (usethreads) {
- vmSwapObjectThreaded(createStringObject(key,sdslen(key)),val,best_db);
+ robj *keyobj = createStringObject(key,sdslen(key));
+ vmSwapObjectThreaded(keyobj,val,best_db);
+ decrRefCount(keyobj);
return REDIS_OK;
} else {
vmpointer *vp;