Solutionunvalidated
null-initialize the skipped positions: for (lin k = 2; k <= p_ptrn_lines; k++) p_line[k] = NULL. — After artificially setting p_end = p_ptrn_lines+1 in the ptrn_missing path. Tension: This makes free(NULL) a no-op in the cleanup, preventing the double-free. Outcome: The fix was applied in GNU patch 2.7.6.
ce55b528-2c32-48fb-9a8f-4c3b780b7436
null-initialize the skipped positions: for (lin k = 2; k <= p_ptrn_lines; k++) p_line[k] = NULL. — After artificially setting p_end = p_ptrn_lines+1 in the ptrn_missing path. Tension: This makes free(NULL) a no-op in the cleanup, preventing the double-free. Outcome: The fix was applied in GNU patch 2.7.6.