]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #99198 - RalfJung:alloc-null-ptr, r=JohnTitor
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Mon, 18 Jul 2022 15:44:45 +0000 (21:14 +0530)
committerGitHub <noreply@github.com>
Mon, 18 Jul 2022 15:44:45 +0000 (21:14 +0530)
commite423a6f5f01c362ac7aacaaa86b12bd52f52d512
tree0a26f06a1e674589c68664c8c2fc18e1c47250d8
parenta027b01f33e3280dff1a7be09d6090151d3f78a9
parent080a53a9533de30c614f37d006985c2f26fd30e7
Rollup merge of #99198 - RalfJung:alloc-null-ptr, r=JohnTitor

add missing null ptr check in alloc example

`alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.