From: Myungho Jung <mhju...@gmail.com> Date: Sun, 9 Apr 2017 22:23:20 -0700
> Kernel panic is caused by trying to dereference null pointer. Check if > the pointer is null before freeing space. > > Signed-off-by: Myungho Jung <mhju...@gmail.com> Your tests are backwards, you therefore did not test your change. In fact, your change is adding a memory leak. It also calls into question whether there is a problem in the first place. What "panic" or crash did you actually see?