What Violation? 1

What bug does this code have?

// Thread 1
if (ptr != nullptr) {
    ptr->process();
}

// Thread 2
delete ptr;
ptr = nullptr;
A

No bug: the nullptr check protects against the deletion

B

Memory leak: ptr is never freed

C

Atomicity violation: Thread 2 can delete ptr between Thread 1's check and dereference

D

Order violation: Thread 2 must always run before Thread 1