Skip to content

Commit 652b52d

Browse files
committed
fix invalid read
1 parent 22f165c commit 652b52d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

highs/pdlp/CupdlpWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ HighsStatus solveLpCupdlp(const HighsOptions& options, HighsTimer& timer,
291291
scaling_clear(scaling);
292292
}
293293

294+
// if (w->timers) {
295+
// timers_clear(0,w->timers);
296+
// }
297+
294298
if (cost != NULL) cupdlp_free(cost);
295299
if (csc_beg != NULL) cupdlp_free(csc_beg);
296300
if (csc_idx != NULL) cupdlp_free(csc_idx);

highs/pdlp/cupdlp/cupdlp_utils.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@ cupdlp_int PDHG_Clear(CUPDLPwork *w) {
337337
CUPDLPtimers *timers = w->timers;
338338
CUPDLPscaling *scaling = w->scaling;
339339

340+
if (timers) {
341+
timers_clear(w->settings->nLogLevel, timers);
342+
}
340343

341344
cupdlp_float begin = getTimeStamp();
342345
#ifndef CUPDLP_CPU
@@ -396,9 +399,7 @@ cupdlp_int PDHG_Clear(CUPDLPwork *w) {
396399
if (stepsize) {
397400
stepsize_clear(stepsize);
398401
}
399-
if (timers) {
400-
timers_clear(w->settings->nLogLevel, timers);
401-
}
402+
402403
if (scaling) {
403404
// scaling_clear(scaling);
404405
// if (scaling->colScale) {

0 commit comments

Comments
 (0)