Re: Bug in ulogd2 when destroying a stack that failed to start (with fix attached)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gérald Colangelo <gerald.colangelo@xxxxxxxxx> wrote:
> +cleanup_fail:
> +	stop = pi;
> +	llist_for_each_entry(pi, &stack->list, list) {
> +		if (pi == stop)
> +			/* the one that failed, stops the cleanup here */
> +			break;
> +		if (!pi->plugin->stop) 
> +			continue;
> +		ret = pi->plugin->stop(pi);
> +		if (ret < 0) {
> +			ulogd_log(ULOGD_ERROR,
> +			"error stopping `%s'\n",
> +			pi->id);
> +		}
> +	}
> +	return -1;

Looks good, but I think you also need to add a second loop to free()
the stack elements, as done in stop_pluginstances().





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux