Commit 3247c4e5 authored by Jiayi Ye's avatar Jiayi Ye Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lnet: klnds: o2iblnd: fix null dereference on failed path in o2iblnd.c



If net is null and failed path is executed, dereference null may happen.
This patch fixes it. The following Coccinelle semantic patch was used.

@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
  ... when != if (E == NULL) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3

Signed-off-by: default avatarJiayi Ye <yejiayily@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 85b4260d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment