mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev: Fix segfault with unknown qeth attribute
This patch fixes a segfault in the qeth get_layer function that occurs when an unknown attribute is used in combination with the force option. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michael Holzheu
parent
e831269e74
commit
c0dc514af8
@@ -1071,7 +1071,11 @@ static exit_code_t setting_ineffective(struct setting *s, int layer2)
|
||||
|
||||
static enum qeth_layer_type get_layer_type(struct setting *s)
|
||||
{
|
||||
struct qeth_attrib_data *data = s->attrib->st_data;
|
||||
struct qeth_attrib_data *data;
|
||||
|
||||
if (!s->attrib)
|
||||
return layer_any;
|
||||
data = s->attrib->st_data;
|
||||
|
||||
if (!data)
|
||||
return layer_any;
|
||||
|
||||
Reference in New Issue
Block a user