Prevent print of uninitialized string
If uninitialized string gets printed, this can cause a crash. Bug: 37218688 CRs-fixed: 2032144 Change-Id: I7c34b6f84f414410c52fc59f73053892060b0874
This commit is contained in:
parent
6cf01fac92
commit
222094ce77
2 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ GnssInterface* Gnss::getGnssInterface() {
|
|||
if (nullptr == mGnssInterface && !getGnssInterfaceFailed) {
|
||||
LOC_LOGD("%s]: loading libgnss.so::getGnssInterface ...", __func__);
|
||||
getLocationInterface* getter = NULL;
|
||||
const char *error;
|
||||
const char *error = NULL;
|
||||
dlerror();
|
||||
void *handle = dlopen("libgnss.so", RTLD_NOW);
|
||||
if (NULL == handle || (error = dlerror()) != NULL) {
|
||||
|
|
|
@ -82,7 +82,7 @@ static void* loadLocationInterface(const char* library, const char* name) {
|
|||
return NULL;
|
||||
}
|
||||
getLocationInterface* getter = NULL;
|
||||
const char *error;
|
||||
const char *error = NULL;
|
||||
dlerror();
|
||||
void *handle = dlopen(library, RTLD_NOW);
|
||||
if (NULL == handle || (error = dlerror()) != NULL) {
|
||||
|
|
Loading…
Reference in a new issue