diff options
-rw-r--r-- | drivers/net/ppp_deflate.c | 6 | ||||
-rw-r--r-- | drivers/net/ppp_generic.c | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ppp_deflate.c b/drivers/net/ppp_deflate.c index 507d6328d4eb..3872088fdd10 100644 --- a/drivers/net/ppp_deflate.c +++ b/drivers/net/ppp_deflate.c | |||
@@ -87,8 +87,7 @@ static void z_comp_free(void *arg) | |||
87 | 87 | ||
88 | if (state) { | 88 | if (state) { |
89 | zlib_deflateEnd(&state->strm); | 89 | zlib_deflateEnd(&state->strm); |
90 | if (state->strm.workspace) | 90 | vfree(state->strm.workspace); |
91 | vfree(state->strm.workspace); | ||
92 | kfree(state); | 91 | kfree(state); |
93 | } | 92 | } |
94 | } | 93 | } |
@@ -308,8 +307,7 @@ static void z_decomp_free(void *arg) | |||
308 | 307 | ||
309 | if (state) { | 308 | if (state) { |
310 | zlib_inflateEnd(&state->strm); | 309 | zlib_inflateEnd(&state->strm); |
311 | if (state->strm.workspace) | 310 | kfree(state->strm.workspace); |
312 | kfree(state->strm.workspace); | ||
313 | kfree(state); | 311 | kfree(state); |
314 | } | 312 | } |
315 | } | 313 | } |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index c456dc81b873..3b377f6cd4a0 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -2467,14 +2467,10 @@ static void ppp_destroy_interface(struct ppp *ppp) | |||
2467 | skb_queue_purge(&ppp->mrq); | 2467 | skb_queue_purge(&ppp->mrq); |
2468 | #endif /* CONFIG_PPP_MULTILINK */ | 2468 | #endif /* CONFIG_PPP_MULTILINK */ |
2469 | #ifdef CONFIG_PPP_FILTER | 2469 | #ifdef CONFIG_PPP_FILTER |
2470 | if (ppp->pass_filter) { | 2470 | kfree(ppp->pass_filter); |
2471 | kfree(ppp->pass_filter); | 2471 | ppp->pass_filter = NULL; |
2472 | ppp->pass_filter = NULL; | 2472 | kfree(ppp->active_filter); |
2473 | } | 2473 | ppp->active_filter = NULL; |
2474 | if (ppp->active_filter) { | ||
2475 | kfree(ppp->active_filter); | ||
2476 | ppp->active_filter = NULL; | ||
2477 | } | ||
2478 | #endif /* CONFIG_PPP_FILTER */ | 2474 | #endif /* CONFIG_PPP_FILTER */ |
2479 | 2475 | ||
2480 | kfree(ppp); | 2476 | kfree(ppp); |