mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 06:36:27 +00:00
iscsi-scstd: Fix code for replacing an attribute value (merge r4545 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4581 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -194,8 +194,6 @@ int iscsi_attr_replace(struct __qelem *attrs_list, const char *sysfs_name,
|
||||
|
||||
a = iscsi_attr_lookup_by_key(attrs_list, key);
|
||||
|
||||
list_add_tail(attr, attrs_list);
|
||||
|
||||
if ((a != NULL) && (a != attr)) {
|
||||
log_error("Attr %s (sysfs_name %s) already exists\n", key,
|
||||
a->sysfs_name);
|
||||
@@ -215,6 +213,7 @@ int iscsi_attr_replace(struct __qelem *attrs_list, const char *sysfs_name,
|
||||
if (new_val == NULL) {
|
||||
log_error("Unable to duplicate attr_value %s", val);
|
||||
res = -ENOMEM;
|
||||
free(new_key);
|
||||
goto out;
|
||||
}
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user