Error in opencl-1.1.pdf ?

I am reading opencl-1.1.pdf. In page 143, there is sample like this:
NOTE: Enqueued commands that specify user events in the event_wait_list argument of
clEnqueue*** commands must ensure that the status of these user events being waited on are set
using clSetUserEventStatus before any OpenCL APIs that release OpenCL objects except for
event objects are called; otherwise the behavior is undefined.
For example, the following code sequence will result in undefined behavior of
clReleaseMemObject.
ev1 = clCreateUserEvent(ctx, NULL);
clEnqueueWriteBuffer(cq, buf1, CL_FALSE, …,
1, &ev1, NULL);
clEnqueueWriteBuffer(cq, buf2, CL_FALSE,…);
clReleaseMemObject(buf2);
clSetUserEventStatus(ev1, CL_COMPLETE);

According to the Note message, I wonder if the example should be like this:
ev1 = clCreateUserEvent(ctx, NULL);
clEnqueueWriteBuffer(cq, buf1, CL_FALSE, …,
1, &ev1, NULL);
clEnqueueWriteBuffer(cq, buf2, CL_FALSE,…);
clReleaseMemObject(buf1);
clSetUserEventStatus(ev1, CL_COMPLETE);

Since buf2 does not wait any user event, there is no side effect if it is released before ev1 is set as CL_COMPLETE.

Am I right?

I think the example in the spec is doing that intentionally.

buf2 depends on the user event transitively: the first call to clEnqueueWriteBuffer() depends on the user event directly and the second call to clEnqueueWriteBuffer() depends implicitly on the previous call, and therefore it depends on the user event implicitly as well.

But what if cq is out-of-order execution?