[PPP]: remove redundant NULL pointer checks before kfree & vfree
kfree() and vfree() can both deal with NULL pointers. This patch removes redundant NULL pointer checks from the ppp code in drivers/net/ Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
このコミットが含まれているのは:
@@ -87,8 +87,7 @@ static void z_comp_free(void *arg)
|
||||
|
||||
if (state) {
|
||||
zlib_deflateEnd(&state->strm);
|
||||
if (state->strm.workspace)
|
||||
vfree(state->strm.workspace);
|
||||
vfree(state->strm.workspace);
|
||||
kfree(state);
|
||||
}
|
||||
}
|
||||
@@ -308,8 +307,7 @@ static void z_decomp_free(void *arg)
|
||||
|
||||
if (state) {
|
||||
zlib_inflateEnd(&state->strm);
|
||||
if (state->strm.workspace)
|
||||
kfree(state->strm.workspace);
|
||||
kfree(state->strm.workspace);
|
||||
kfree(state);
|
||||
}
|
||||
}
|
||||
|
新しいイシューから参照
ユーザーをブロックする