]> git.saurik.com Git - redis.git/blobdiff - src/redis.c
use the function deprecated attribute if compiling with GCC to get warnings for mallo...
[redis.git] / src / redis.c
index 9978eab5637818886f2594d5e8a70d09d4d416c0..f6040dfe7dcfbd3d857d45fc8a8c7e64bbce76dc 100644 (file)
@@ -826,7 +826,7 @@ int qsortRedisCommands(const void *r1, const void *r2) {
 
 void sortCommandTable() {
     /* Copy and sort the read-only version of the command table */
-    commandTable = (struct redisCommand*)malloc(sizeof(readonlyCommandTable));
+    commandTable = (struct redisCommand*)zmalloc(sizeof(readonlyCommandTable));
     memcpy(commandTable,readonlyCommandTable,sizeof(readonlyCommandTable));
     qsort(commandTable,
         sizeof(readonlyCommandTable)/sizeof(struct redisCommand),