Merge "Invoking dlclose in error case"

This commit is contained in:
Linux Build Service Account 2018-11-20 11:57:01 -08:00 committed by Gerrit - the friendly Code Review server
commit 80b5ce40d7

View file

@ -3716,6 +3716,7 @@ void GnssAdapter::initDefaultAgps() {
dlsym(handle, "LocNetIfaceAgps_getAgpsCbInfo"); dlsym(handle, "LocNetIfaceAgps_getAgpsCbInfo");
if (getAgpsCbInfo == nullptr) { if (getAgpsCbInfo == nullptr) {
LOC_LOGE("%s]: Failed to get method LocNetIfaceAgps_getStatusCb", __func__); LOC_LOGE("%s]: Failed to get method LocNetIfaceAgps_getStatusCb", __func__);
dlclose(handle);
return; return;
} }
@ -3723,6 +3724,7 @@ void GnssAdapter::initDefaultAgps() {
if (cbInfo.statusV4Cb == nullptr) { if (cbInfo.statusV4Cb == nullptr) {
LOC_LOGE("%s]: statusV4Cb is nullptr!", __func__); LOC_LOGE("%s]: statusV4Cb is nullptr!", __func__);
dlclose(handle);
return; return;
} }