gpgme_data_releasedestroys the data object with the handle dh. It releases all associated resources that were not provided by the user in the first place.
gpgme_data_release, except that it returns the data buffer and its length that was provided by the object.
The user has to release the buffer with
gpgme_free. In case the user provided the data buffer in non-copy mode, a copy will be made for this purpose.
In case an error returns, or there is no suitable data buffer that can be returned to the user, the function will return
NULL. In any case, the data object dh is destroyed.