Closed aloisklink closed 1 year ago
Merging #524 (e940f3a) into main (8e2f61a) will decrease coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #524 +/- ##
==========================================
- Coverage 53.57% 53.56% -0.01%
==========================================
Files 144 144
Lines 20005 20001 -4
==========================================
- Hits 10717 10713 -4
Misses 9288 9288
Impacted Files | Coverage Δ | |
---|---|---|
tests/test_runctl.c | 94.73% <100.00%> (-0.18%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Feel free to add PR for cleanup.
test_init_context()
intest/test_runctl.c
createsctx->config_ifinfo_array
, but it's never deallocated.In fact, it's even allocated twice to the same variable.
Allocated here:
I've removed the extraneous allocation, and added a
utarray_free(context.config_ifinfo_array);
at the end of the test function to fix this memory leak.Side-note, the cleanup code for a
struct supervisor_context
andstruct app_config
is currently a bit messy. Can we somehow refactor this into cleanup functions?