From 1a2cd61ac5fbd81df4e1a37375839c100658c5c7 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Sun, 24 Jan 2021 13:17:41 -0700 Subject: [PATCH] Fix potential null pointer dereferences in UniformStressSmoother_new --- lib/sfdpgen/uniform_stress.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/sfdpgen/uniform_stress.c b/lib/sfdpgen/uniform_stress.c index 02bf99766..e8e072842 100644 --- a/lib/sfdpgen/uniform_stress.c +++ b/lib/sfdpgen/uniform_stress.c @@ -51,9 +51,6 @@ UniformStressSmoother UniformStressSmoother_new(int dim, SparseMatrix A, real *x /* Lw and Lwd have diagonals */ sm->Lw = SparseMatrix_new(m, m, A->nz + m, MATRIX_TYPE_REAL, FORMAT_CSR); sm->Lwd = SparseMatrix_new(m, m, A->nz + m, MATRIX_TYPE_REAL, FORMAT_CSR); - iw = sm->Lw->ia; jw = sm->Lw->ja; - id = sm->Lwd->ia; jd = sm->Lwd->ja; - w = (real*) sm->Lw->a; d = (real*) sm->Lwd->a; if (!(sm->Lw) || !(sm->Lwd)) { StressMajorizationSmoother_delete(sm); -- 2.40.0