diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 2e0b914..cee8adf 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -2135,7 +2135,7 @@ static bool should_keep_jump_label(struct lookup_table *lookup, unsigned int group_size, int *jump_labels_found) { - struct rela *code, *key, *rela; + struct rela *code = NULL, *key = NULL, *rela; bool tracepoint = false, dynamic_debug = false; struct lookup_result symbol; int i = 0; @@ -2156,7 +2156,7 @@ static bool should_keep_jump_label(struct lookup_table *lookup, } } - if (i != 3) + if (i != 3 || !key || !code) ERROR("BUG: __jump_table has an unexpected format"); if (!strncmp(key->sym->name, "__tracepoint_", 13))