lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 16 Jul 2018 19:09:02 -0700 From: Todd Poynor <toddpoynor@...il.com> To: Rob Springer <rspringer@...gle.com>, John Joseph <jnjoseph@...gle.com>, Ben Chan <benchan@...omium.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org> Cc: Zhongze Hu <frankhu@...omium.org>, Simon Que <sque@...omium.org>, Dmitry Torokhov <dtor@...omium.org>, Guenter Roeck <groeck@...omium.org>, devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org, Todd Poynor <toddpoynor@...gle.com> Subject: [PATCH 08/32] staging: gasket: Remove stale pointers on error allocating attr array From: Todd Poynor <toddpoynor@...gle.com> If gasket_sysfs_create_mapping() hits errors allocating the attribute array, remove stale pointers to device info from the mapping object. Signed-off-by: Zhongze Hu <frankhu@...omium.org> Signed-off-by: Todd Poynor <toddpoynor@...gle.com> --- drivers/staging/gasket/gasket_sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/gasket/gasket_sysfs.c b/drivers/staging/gasket/gasket_sysfs.c index dd4d3aaa57e2f..1c5f7502e0d5e 100644 --- a/drivers/staging/gasket/gasket_sysfs.c +++ b/drivers/staging/gasket/gasket_sysfs.c @@ -225,6 +225,8 @@ int gasket_sysfs_create_mapping( mapping->attribute_count = 0; if (!mapping->attributes) { gasket_nodev_error("Unable to allocate sysfs attribute array."); + mapping->device = NULL; + mapping->gasket_dev = NULL; mutex_unlock(&mapping->mutex); mutex_unlock(&function_mutex); return -ENOMEM; -- 2.18.0.203.gfac676dfb9-goog
Powered by blists - more mailing lists