return;
}
- svc_check_db = dlsym(funcHandle, "check_db");
+ svc_check_db = dlsym(funcHandle, "check_db");
+ if (svc_check_db == NULL) {
+ printf("find check_db failed\n");
+ dlclose(funcHandle);
+ return;
+ }
ret = media_db_connect(&db_handle, tzplatform_getuid(TZ_USER_NAME), false);
if (ret < 0)
return -1;
}
- svc_get_storage_id = dlsym(funcHandle, "get_storage_id");
+ svc_get_storage_id = dlsym(funcHandle, "get_storage_id");
+ if (svc_get_storage_id == NULL) {
+ printf("find get_storage_id failed\n");
+ dlclose(funcHandle);
+ return -1;
+ }
ret = media_db_connect(&db_handle, uid, false);
if (ret < 0) {