I've executed covscan analysis on the liblognorm component, which detected a list of potential defects. The second and fourth seem like false positives to me. Let me know if there is a way to make such a warning disappear.
liblognorm-2.0.6/src/samp.c:812: alloc_fn: Storage is returned from allocation function "ln_newAnnot".
liblognorm-2.0.6/src/samp.c:812: var_assign: Assigning: "annot" = storage returned from "ln_newAnnot(tag)".
liblognorm-2.0.6/src/samp.c:815: noescape: Resource "annot" is not freed or pointed-to in "getAnnotationOp".
liblognorm-2.0.6/src/samp.c:820: leaked_storage: Variable "annot" going out of scope leaks the storage it points to.
# 818| r = ln_addAnnotToSet(ctx->pas, annot);
# 819|
# 820|-> done: return r;
# 821| }
# 822|
Error: RESOURCE_LEAK (CWE-772): [#def3]
liblognorm-2.0.6/src/samp.c:1136: alloc_fn: Storage is returned from allocation function "tryOpenRBFile".
liblognorm-2.0.6/src/samp.c:1136: var_assign: Assigning: "repo" = storage returned from "tryOpenRBFile(ctx, file)".
liblognorm-2.0.6/src/samp.c:1138: noescape: Resource "repo" is not freed or pointed-to in "checkVersion".
liblognorm-2.0.6/src/samp.c:1167: leaked_storage: Variable "repo" going out of scope leaks the storage it points to.
# 1165| ln_pdagOptimize(ctx);
# 1166| done:
# 1167|-> return r;
# 1168| }
# 1169|
Error: RESOURCE_LEAK (CWE-772): [#def4]
liblognorm-2.0.6/src/v1_samp.c:747: alloc_fn: Storage is returned from allocation function "ln_newAnnot".
liblognorm-2.0.6/src/v1_samp.c:747: var_assign: Assigning: "annot" = storage returned from "ln_newAnnot(tag)".
liblognorm-2.0.6/src/v1_samp.c:750: noescape: Resource "annot" is not freed or pointed-to in "getAnnotationOp".
liblognorm-2.0.6/src/v1_samp.c:755: leaked_storage: Variable "annot" going out of scope leaks the storage it points to.
# 753| r = ln_addAnnotToSet(ctx->pas, annot);
# 754|
# 755|-> done: return r;
# 756| }
# 757|
I've executed covscan analysis on the liblognorm component, which detected a list of potential defects. The second and fourth seem like false positives to me. Let me know if there is a way to make such a warning disappear.
Error: USE_AFTER_FREE (CWE-416): [#def1]
Error: RESOURCE_LEAK (CWE-772): [#def2]
Error: RESOURCE_LEAK (CWE-772): [#def3]
Error: RESOURCE_LEAK (CWE-772): [#def4]