]> git.saurik.com Git - redis.git/commitdiff
Enabled object encoding for multiple keys in MSET. Added a test for memory leaks...
authorantirez <antirez@gmail.com>
Sat, 28 Nov 2009 15:55:05 +0000 (16:55 +0100)
committerantirez <antirez@gmail.com>
Sat, 28 Nov 2009 15:55:05 +0000 (16:55 +0100)
ae_kqueue.c
redis.c
test-redis.tcl

index 1dc86af5deb350194a8b0cb41e7335864a352270..6408e3222d2aeea96d757d8658309e91499c6fce 100644 (file)
@@ -84,7 +84,6 @@ static int aeApiPoll(aeEventLoop *eventLoop, struct timeval *tvp) {
             eventLoop->fired[j].fd = e->ident; 
             eventLoop->fired[j].mask = mask;           
         }
-        
     }
     return numevents;
-}
\ No newline at end of file
+}
diff --git a/redis.c b/redis.c
index dff33754fb4109d4267a4a2412d736815550a62c..1236d9b5bff0c4e4bdde13692cfd73a1758a79e2 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -3059,6 +3059,7 @@ static void msetGenericCommand(redisClient *c, int nx) {
     for (j = 1; j < c->argc; j += 2) {
         int retval;
 
+        tryObjectEncoding(c->argv[j+1]);
         retval = dictAdd(c->db->dict,c->argv[j],c->argv[j+1]);
         if (retval == DICT_ERR) {
             dictReplace(c->db->dict,c->argv[j],c->argv[j+1]);
index a7acf641f6b528e7641470602154303da3827aaa..00850c8151da6caf72e8085a206fb2865a71d94d 100644 (file)
@@ -1092,6 +1092,14 @@ proc main {server port} {
         $r save
     } {OK}
 
+    catch {
+        if {[string match {*Darwin*} [exec uname -a]]} {
+            test {Check for memory leaks} {
+                exec leaks redis-server
+            } {*0 leaks*}
+        }
+    }
+
     puts "\n[expr $::passed+$::failed] tests, $::passed passed, $::failed failed"
     if {$::failed > 0} {
         puts "\n*** WARNING!!! $::failed FAILED TESTS ***\n"