Skip to content

Commit d744f46

Browse files
rjoomenLevi-Armstrong
authored andcommitted
Fixes two forgotten csc_spfree calls
1 parent 713cc9d commit d744f46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trajopt_optimizers/trajopt_sqp/src/osqp_eigen_solver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ bool OSQPEigenSolver::updateLinearConstraintsMatrix(const SparseMatrix& linearCo
312312
bool success = solver_.updateLinearConstraintsMatrix(cleaned);
313313
if (cleaned.nonZeros() == 0) /** @todo Remove when upgrading to OSQP 1.0.0 */
314314
{
315-
csc_spfree(solver_.data()->getData()->A);
315+
csc_spfree_fix(solver_.data()->getData()->A);
316316
solver_.data()->getData()->A = nullptr;
317317
solver_.data()->getData()->A = csc_spalloc_fix(cleaned.rows(), cleaned.cols(), 0, 1, 0);
318318
}
@@ -322,7 +322,7 @@ bool OSQPEigenSolver::updateLinearConstraintsMatrix(const SparseMatrix& linearCo
322322
bool success = solver_.data()->setLinearConstraintsMatrix(cleaned);
323323
if (cleaned.nonZeros() == 0) /** @todo Remove when upgrading to OSQP 1.0.0 */
324324
{
325-
csc_spfree(solver_.data()->getData()->A);
325+
csc_spfree_fix(solver_.data()->getData()->A);
326326
solver_.data()->getData()->A = nullptr;
327327
solver_.data()->getData()->A = csc_spalloc_fix(cleaned.rows(), cleaned.cols(), 0, 1, 0);
328328
}

0 commit comments

Comments
 (0)