Commit eedc74e
committed
mip: Fix use-after-move in HighsLpRelaxation::loadModel
Save lpmodel.num_col_ before passing lpmodel via std::move to
lpsolver.passModel(). After the move, lpmodel is in a valid but
unspecified state, making access to its members undefined behavior.
Found by Coverity static analysis.1 parent 96f998e commit eedc74e
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
243 | | - | |
244 | | - | |
| 244 | + | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
0 commit comments