Code

zone plugin: plug leak on error
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:32:36 +0000 (10:32 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:32:36 +0000 (10:32 +0200)
[src/zone.c:124]: (error) Memory leak: ret

src/zone.c

index 52dc55395bbd4edfc9d9eca1ad7ab636ffec15b7..0e9fee386f8c47749da5d320f407dfce4a56a545 100644 (file)
@@ -121,6 +121,7 @@ zone_find_stats(c_avl_tree_t *tree, zoneid_t zoneid)
                }
                if (!(key = malloc(sizeof(*key)))) {
                        WARNING("zone plugin: no memory");
+                       free(ret);
                        return(NULL);
                }
                *key = zoneid;