Unverified Commit c8f2c730 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11115 net/iucv: fix use after free in iucv_sock_close()

parents 48bea924 0d32791a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -359,8 +359,8 @@ static void iucv_sever_path(struct sock *sk, int with_user_data)
	struct iucv_sock *iucv = iucv_sk(sk);
	struct iucv_path *path = iucv->path;

	if (iucv->path) {
		iucv->path = NULL;
	/* Whoever resets the path pointer, must sever and free it. */
	if (xchg(&iucv->path, NULL)) {
		if (with_user_data) {
			low_nmcpy(user_data, iucv->src_name);
			high_nmcpy(user_data, iucv->dst_name);