|
@@ -86,10 +86,9 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
|
|
|
|
|
|
/* Discarding const is appropriate here. */
|
|
/* Discarding const is appropriate here. */
|
|
asoc->ep = (struct sctp_endpoint *)ep;
|
|
asoc->ep = (struct sctp_endpoint *)ep;
|
|
- sctp_endpoint_hold(asoc->ep);
|
|
|
|
-
|
|
|
|
- /* Hold the sock. */
|
|
|
|
asoc->base.sk = (struct sock *)sk;
|
|
asoc->base.sk = (struct sock *)sk;
|
|
|
|
+
|
|
|
|
+ sctp_endpoint_hold(asoc->ep);
|
|
sock_hold(asoc->base.sk);
|
|
sock_hold(asoc->base.sk);
|
|
|
|
|
|
/* Initialize the common base substructure. */
|
|
/* Initialize the common base substructure. */
|
|
@@ -343,8 +342,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
|
|
return asoc;
|
|
return asoc;
|
|
|
|
|
|
fail_init:
|
|
fail_init:
|
|
- sctp_endpoint_put(asoc->ep);
|
|
|
|
sock_put(asoc->base.sk);
|
|
sock_put(asoc->base.sk);
|
|
|
|
+ sctp_endpoint_put(asoc->ep);
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|