[sheepdog] [PATCH] recovery: initialize recovery_state
Liu Yuan
namei.unix at gmail.com
Mon Aug 19 08:05:39 CEST 2013
On Sat, Aug 17, 2013 at 04:52:08AM +0900, MORITA Kazutaka wrote:
> From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
>
> This prevents dog from reading uninitialize data and fixes a valgrind
> error of functional tests.
>
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
> sheep/recovery.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sheep/recovery.c b/sheep/recovery.c
> index 1b5adc1..e734b88 100644
> --- a/sheep/recovery.c
> +++ b/sheep/recovery.c
> @@ -872,6 +872,8 @@ void get_recovery_state(struct recovery_state *state)
> {
> struct recovery_info *rinfo = main_thread_get(current_rinfo);
>
> + memset(state, 0, sizeof(*state));
> +
> if (!rinfo) {
> state->in_recovery = 0;
> return;
Applied thanks
Yuan
More information about the sheepdog
mailing list