Re: [PATCH v2] sock: fix potential memory leak in proto_register()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: zhanglin <zhang.lin16@xxxxxxxxxx>
Date: Wed, 21 Aug 2019 08:42:38 +0800

> @@ -3243,18 +3245,24 @@ int proto_register(struct proto *prot, int alloc_slab)
>  	}
>  
>  	mutex_lock(&proto_list_mutex);
> +	if (assign_proto_idx(prot)) {
> +		mutex_unlock(&proto_list_mutex);
> +		goto out_free_timewait_sock_slab_name;
> +	}

Propagate the error code properly please.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux