Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pnm): Initialize m_pfm_flip before use to avoid UB. (#4446)
Fixes #4445 This avoids UB by initializing a variable. ## Tests I ran valgrind after the fix: no longer issues error. ``` ==77256== ==77256== HEAP SUMMARY: ==77256== in use at exit: 25,167,390 bytes in 8,232 blocks ==77256== total heap usage: 183,524 allocs, 175,292 frees, 4,415,783,216 bytes allocated ==77256== ==77256== LEAK SUMMARY: ==77256== definitely lost: 0 bytes in 0 blocks ==77256== indirectly lost: 0 bytes in 0 blocks ==77256== possibly lost: 0 bytes in 0 blocks ==77256== still reachable: 25,167,390 bytes in 8,232 blocks ==77256== suppressed: 0 bytes in 0 blocks ==77256== Rerun with --leak-check=full to see details of leaked memory ==77256== ==77256== For lists of detected and suppressed errors, rerun with: -s ==77256== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ``` --- Signed-off-by: Bram Stolk <[email protected]>
- Loading branch information