Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa613bfc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "rmnet_data: Fix use-after-free in rmnet_vnd_create_dev"

parents bc46a78f 6de7e097
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -578,7 +578,7 @@ int rmnet_vnd_create_dev(int id, struct net_device **new_device,
		LOGE("Failed to to register netdev [%s]", dev->name);
		free_netdev(dev);
		*new_device = 0;
		rc = RMNET_CONFIG_UNKNOWN_ERROR;
		return RMNET_CONFIG_UNKNOWN_ERROR;
	} else {
		rmnet_devices[id] = dev;
		*new_device = dev;