libsample: Correctly assign m_handle to ptr.