diff options
author | Lee Duncan <lduncan@suse.com> | 2021-06-17 09:59:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 09:59:37 -0700 |
commit | e0ed60fb8e492a9e90c6dbadb168bf27163db5c4 (patch) | |
tree | 26aa6d5b15c4bb8fe8166bd2984a76e3a45b723a | |
parent | 3f3f7a457d5d480636fddbddd35a9e9ed3cf6df5 (diff) | |
parent | b9bf7cea4769efa73e6de9b13a8d1833d2ac3d92 (diff) | |
download | open-iscsi-e0ed60fb8e492a9e90c6dbadb168bf27163db5c4.tar.gz |
Merge pull request #265 from cleech/for_upstream
iscsistart: fix null pointer deref before exit
-rw-r--r-- | usr/iscsistart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/iscsistart.c b/usr/iscsistart.c index 206cd4c..7eb573e 100644 --- a/usr/iscsistart.c +++ b/usr/iscsistart.c @@ -361,7 +361,7 @@ int main(int argc, char *argv[]) struct boot_context *context, boot_context; struct sigaction sa_old; struct sigaction sa_new; - struct user_param *param; + struct user_param *param, *tmp_param; int control_fd, mgmt_ipc_fd, err; pid_t pid; @@ -556,7 +556,7 @@ int main(int argc, char *argv[]) mgmt_ipc_close(mgmt_ipc_fd); free_initiator(); sysfs_cleanup(); - list_for_each_entry(param, &user_params, list) { + list_for_each_entry_safe(param, tmp_param, &user_params, list) { list_del(¶m->list); idbm_free_user_param(param); } |