mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-22 09:44:56 +02:00
- Fix memleak in unit test, reported from the clang 8.0 static analyzer.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
24 June 2019: Wouter
|
||||
- Fix memleak in unit test, reported from the clang 8.0 static analyzer.
|
||||
|
||||
18 June 2019: Wouter
|
||||
- PR #28: IPSet module, by Kevin Chou. Created a module to support
|
||||
the ipset that could add the domain's ip to a list easily.
|
||||
|
||||
+9
-2
@@ -106,9 +106,16 @@ get_codeline(rbtree_type* tree, char* key, char* func)
|
||||
cl = calloc(1, sizeof(*cl));
|
||||
if(!cl) return 0;
|
||||
cl->codeline = strdup(key);
|
||||
if(!cl->codeline) return 0;
|
||||
if(!cl->codeline) {
|
||||
free(cl);
|
||||
return 0;
|
||||
}
|
||||
cl->func = strdup(func);
|
||||
if(!cl->func) return 0;
|
||||
if(!cl->func) {
|
||||
free(cl->codeline);
|
||||
free(cl);
|
||||
return 0;
|
||||
}
|
||||
cl->alloc = 0;
|
||||
cl->node.key = cl->codeline;
|
||||
(void)rbtree_insert(tree, &cl->node);
|
||||
|
||||
Reference in New Issue
Block a user