Share exception bug
NULL Ref stays on the stack after plugin throws an exception. The m_refs.pop()
should be moved from:
if (data_ref && !ref()) {
m_refs.pop();
throw Error{PDI_ERR_RIGHT, "Unable to grant requested rights"};
}
to:
catch (...) {
// on error, do not free the data as would be done automatically otherwise
r.release();
assert((!metadata() || !m_refs.empty()) && "metadata descriptors should always keep a placeholder");
throw;
}