diff options
Diffstat (limited to 'src/gen_bpf.c')
-rw-r--r-- | src/gen_bpf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gen_bpf.c b/src/gen_bpf.c index 01c2709..164e87b 100644 --- a/src/gen_bpf.c +++ b/src/gen_bpf.c @@ -1005,9 +1005,13 @@ static struct bpf_blk *_gen_bpf_syscall(struct bpf_state *state, int rc; struct bpf_instr instr; struct bpf_blk *blk_c, *blk_s = NULL; - struct bpf_jump def_jump = _BPF_JMP_HSH(state->def_hsh); + struct bpf_jump def_jump; struct acc_state a_state; + /* we do the memset before the assignment to keep valgrind happy */ + memset(&def_jump, 0, sizeof(def_jump)); + def_jump = _BPF_JMP_HSH(state->def_hsh); + /* setup the accumulator state */ if (acc_reset) { _BPF_INSTR(instr, BPF_LD+BPF_ABS, _BPF_JMP_NO, _BPF_JMP_NO, |