Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Change flux_handle_destroy prototype to avoid potential memory corruption, fix small leak in flux cmd help #1067
As discussed in #1062, we were seeing memory corruption from an error path in ssh connector because of the order of destruction of connector implementation object and flux handle object. Since
Long story short - it is probably simplest to avoid the "destroy nullifies its argument" idiom in this case, as it is rarely used in the rest of flux API, and we can thereby avoid other accidental cases of memory corruption like this in the future.
I also found a small memory leak in cmd/cmdhelp.c that I threw in here (after some valgrind runs)
@@ Coverage Diff @@ ## master #1067 +/- ## ========================================== - Coverage 77.78% 77.77% -0.02% ========================================== Files 148 148 Lines 25772 25771 -1 ========================================== - Hits 20048 20043 -5 - Misses 5724 5728 +4