In case set_consume goes wrong, the pattern name has already been
freed. So we do not try to print it in the logs, assuming the pattern
addition print will be printed just before the failure anyway. Found
with coverity. Fixes: CID#
1237798
log_debug("Adding pattern: %s", pattern);
r = set_consume(set, pattern);
if (r < 0) {
log_debug("Adding pattern: %s", pattern);
r = set_consume(set, pattern);
if (r < 0) {
- log_error("Failed to add pattern '%s': %s",
- pattern, strerror(-r));
+ log_error("Failed to add pattern: %s", strerror(-r));