From 3e48d9ff1c49af9b8d475e167c5ac25039aa0b36 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 1 Apr 2024 22:49:04 +0000 Subject: [PATCH] init var to fix missing symtab section path found by smatch, ok mpi@ --- usr.sbin/btrace/ksyms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/btrace/ksyms.c b/usr.sbin/btrace/ksyms.c index 960b0d9e0ec..422936adb21 100644 --- a/usr.sbin/btrace/ksyms.c +++ b/usr.sbin/btrace/ksyms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ksyms.c,v 1.9 2024/03/16 17:42:37 cheloha Exp $ */ +/* $OpenBSD: ksyms.c,v 1.10 2024/04/01 22:49:04 jsg Exp $ */ /* * Copyright (c) 2016 Martin Pieuchot @@ -51,7 +51,7 @@ kelf_open(const char *path) char *name; Elf *elf; Elf_Data *data = NULL; - Elf_Scn *scn = NULL, *symtab; + Elf_Scn *scn = NULL, *symtab = NULL; GElf_Sym sym; GElf_Shdr shdr; size_t i, shstrndx, strtabndx = SIZE_MAX, symtab_size; -- 2.20.1