Skip to content

Commit 6efc513

Browse files
author
Harini Subramanian
committed
zebra: Coverity issue (Null pointer derefence(CID 110225))
This commit addresses null pointer dereference in zebra/zebra_srv6_vty.c CID 110225: Dereference null return value (NULL_RETURNS) dereference: Dereferencing zvrf, which is known to be NULL. Description: Handled null check accordingly. Signed-off-by: Harini Subramanian <hnattamaisub@nvidia.com>
1 parent 108d9b0 commit 6efc513

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zebra/zebra_srv6_vty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static void do_show_srv6_sid_json(struct vty *vty, json_object **json, struct sr
464464
json_object_string_add(json_sid_ctx, "vrfName", vrf->name);
465465

466466
zvrf = vrf_info_lookup(sid_ctx->ctx.vrf_id);
467-
if (vrf)
467+
if (zvrf)
468468
json_object_int_add(json_sid_ctx, "table", zvrf->table_id);
469469
}
470470
if (sid_ctx->ctx.ifindex) {

0 commit comments

Comments
 (0)