util/sockopt: catch logging errors
Make sure to catch logging errors, rather than silently dropping them.
This only affects ENOMEM, so no big issue. But lets be precise here.
@@ -145,8 +145,10 @@ int sockopt_get_peergroups(int fd, Log *log, uid_t uid, gid_t primary_gid, gid_t
if (!warned) {
warned = true;
log_append_here(log, LOG_ERR, 0, DBUS_BROKER_CATALOG_NO_SOPEERGROUP);
- log_commitf(log, "Falling back to racy auxiliary groups"
+ r = log_commitf(log, "Falling back to racy auxiliary groups"
"resolution using nss.\n");
+ if (r)
+ return error_fold(r);
}
}
