Search Linux Wireless

Re: [RFC] wwan: add a new WWAN subsystem

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

 



From: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Date: Tue, 25 Feb 2020 11:00:53 +0100

> +static struct wwan_device *wwan_create(struct device *dev)
> +{
> +	struct wwan_device *wwan = kzalloc(sizeof(*wwan), GFP_KERNEL);
> +	u32 id = ++wwan_id_counter;
> +	int err;
> +
> +	lockdep_assert_held(&wwan_mtx);
> +
> +	if (WARN_ON(!id))
> +		return ERR_PTR(-ENOSPC);

This potentially leaks 'wwan'.



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux