diff options
Diffstat (limited to 'net/iucv')
-rw-r--r-- | net/iucv/af_iucv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 6b5f193e5f48..eb8a2a0b6eb7 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -1042,12 +1042,14 @@ static int iucv_callback_connreq(struct iucv_path *path, | |||
1042 | ASCEBC(user_data, sizeof(user_data)); | 1042 | ASCEBC(user_data, sizeof(user_data)); |
1043 | if (sk->sk_state != IUCV_LISTEN) { | 1043 | if (sk->sk_state != IUCV_LISTEN) { |
1044 | err = iucv_path_sever(path, user_data); | 1044 | err = iucv_path_sever(path, user_data); |
1045 | iucv_path_free(path); | ||
1045 | goto fail; | 1046 | goto fail; |
1046 | } | 1047 | } |
1047 | 1048 | ||
1048 | /* Check for backlog size */ | 1049 | /* Check for backlog size */ |
1049 | if (sk_acceptq_is_full(sk)) { | 1050 | if (sk_acceptq_is_full(sk)) { |
1050 | err = iucv_path_sever(path, user_data); | 1051 | err = iucv_path_sever(path, user_data); |
1052 | iucv_path_free(path); | ||
1051 | goto fail; | 1053 | goto fail; |
1052 | } | 1054 | } |
1053 | 1055 | ||
@@ -1055,6 +1057,7 @@ static int iucv_callback_connreq(struct iucv_path *path, | |||
1055 | nsk = iucv_sock_alloc(NULL, SOCK_STREAM, GFP_ATOMIC); | 1057 | nsk = iucv_sock_alloc(NULL, SOCK_STREAM, GFP_ATOMIC); |
1056 | if (!nsk) { | 1058 | if (!nsk) { |
1057 | err = iucv_path_sever(path, user_data); | 1059 | err = iucv_path_sever(path, user_data); |
1060 | iucv_path_free(path); | ||
1058 | goto fail; | 1061 | goto fail; |
1059 | } | 1062 | } |
1060 | 1063 | ||
@@ -1078,6 +1081,8 @@ static int iucv_callback_connreq(struct iucv_path *path, | |||
1078 | err = iucv_path_accept(path, &af_iucv_handler, nuser_data, nsk); | 1081 | err = iucv_path_accept(path, &af_iucv_handler, nuser_data, nsk); |
1079 | if (err) { | 1082 | if (err) { |
1080 | err = iucv_path_sever(path, user_data); | 1083 | err = iucv_path_sever(path, user_data); |
1084 | iucv_path_free(path); | ||
1085 | iucv_sock_kill(nsk); | ||
1081 | goto fail; | 1086 | goto fail; |
1082 | } | 1087 | } |
1083 | 1088 | ||