}
bf::perms permissions = bf::status(src).permissions();
struct stat stats;
- stat(src.c_str(), &stats);
+ if (stat(src.c_str(), &stats) != 0)
+ return false;
if (!SetDirOwnershipAndPermissions(dst, permissions, stats.st_uid,
stats.st_gid)) {
LOG(ERROR) << "Failed to copy ownership and permissions"
char *cert_db = getUserPkgCertDBPathUID(uid);
if (parser_db == nullptr || cert_db == nullptr) {
std::cerr << "Failed to get db path, cannot remove old databases";
+ free(parser_db);
+ free(cert_db);
return;
}
std::string journal = "-journal";