pthreads_frame: Do not leak on failure path