diff options
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 4 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 632090b961c3..3a1767ef3201 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1421,8 +1421,8 @@ static void sctp_chunk_destroy(struct sctp_chunk *chunk) | |||
1421 | BUG_ON(!list_empty(&chunk->list)); | 1421 | BUG_ON(!list_empty(&chunk->list)); |
1422 | list_del_init(&chunk->transmitted_list); | 1422 | list_del_init(&chunk->transmitted_list); |
1423 | 1423 | ||
1424 | /* Free the chunk skb data and the SCTP_chunk stub itself. */ | 1424 | consume_skb(chunk->skb); |
1425 | dev_kfree_skb(chunk->skb); | 1425 | consume_skb(chunk->auth_chunk); |
1426 | 1426 | ||
1427 | SCTP_DBG_OBJCNT_DEC(chunk); | 1427 | SCTP_DBG_OBJCNT_DEC(chunk); |
1428 | kmem_cache_free(sctp_chunk_cachep, chunk); | 1428 | kmem_cache_free(sctp_chunk_cachep, chunk); |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index ae65b6b5973a..01e002430c85 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -760,7 +760,6 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, | |||
760 | 760 | ||
761 | /* Make sure that we and the peer are AUTH capable */ | 761 | /* Make sure that we and the peer are AUTH capable */ |
762 | if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) { | 762 | if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) { |
763 | kfree_skb(chunk->auth_chunk); | ||
764 | sctp_association_free(new_asoc); | 763 | sctp_association_free(new_asoc); |
765 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | 764 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); |
766 | } | 765 | } |
@@ -775,10 +774,6 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, | |||
775 | auth.transport = chunk->transport; | 774 | auth.transport = chunk->transport; |
776 | 775 | ||
777 | ret = sctp_sf_authenticate(net, ep, new_asoc, type, &auth); | 776 | ret = sctp_sf_authenticate(net, ep, new_asoc, type, &auth); |
778 | |||
779 | /* We can now safely free the auth_chunk clone */ | ||
780 | kfree_skb(chunk->auth_chunk); | ||
781 | |||
782 | if (ret != SCTP_IERROR_NO_ERROR) { | 777 | if (ret != SCTP_IERROR_NO_ERROR) { |
783 | sctp_association_free(new_asoc); | 778 | sctp_association_free(new_asoc); |
784 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | 779 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); |