|
@@ -253,13 +253,20 @@ out:
|
|
|
int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid)
|
|
int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid)
|
|
|
{
|
|
{
|
|
|
struct sctp_stream_out_ext *soute;
|
|
struct sctp_stream_out_ext *soute;
|
|
|
|
|
+ int ret;
|
|
|
|
|
|
|
|
soute = kzalloc(sizeof(*soute), GFP_KERNEL);
|
|
soute = kzalloc(sizeof(*soute), GFP_KERNEL);
|
|
|
if (!soute)
|
|
if (!soute)
|
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
SCTP_SO(stream, sid)->ext = soute;
|
|
SCTP_SO(stream, sid)->ext = soute;
|
|
|
|
|
|
|
|
- return sctp_sched_init_sid(stream, sid, GFP_KERNEL);
|
|
|
|
|
|
|
+ ret = sctp_sched_init_sid(stream, sid, GFP_KERNEL);
|
|
|
|
|
+ if (ret) {
|
|
|
|
|
+ kfree(SCTP_SO(stream, sid)->ext);
|
|
|
|
|
+ SCTP_SO(stream, sid)->ext = NULL;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return ret;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void sctp_stream_free(struct sctp_stream *stream)
|
|
void sctp_stream_free(struct sctp_stream *stream)
|