1
1

Merge pull request #5867 from ggouaillardet/topic/v4.0.x/hostfile_double_free

util/hostfile: fix a double free error
Этот коммит содержится в:
Geoff Paulsen 2018-10-09 08:00:03 -05:00 коммит произвёл GitHub
родитель 9be650c7b9 2e2366d193
Коммит c2e99c3f40
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -13,7 +13,7 @@
* reserved. * reserved.
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved. * Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015-2017 Research Organization for Information Science * Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved. * and Technology (RIST). All rights reserved.
* Copyright (c) 2016 IBM Corporation. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
@ -159,7 +159,7 @@ static int hostfile_parse_line(int token, opal_list_t* updates,
if (1 == cnt) { if (1 == cnt) {
node_name = strdup(argv[0]); node_name = strdup(argv[0]);
} else if (2 == cnt) { } else if (2 == cnt) {
username = argv[0]; username = strdup(argv[0]);
node_name = strdup(argv[1]); node_name = strdup(argv[1]);
} else { } else {
opal_output(0, "WARNING: Unhandled user@host-combination\n"); /* XXX */ opal_output(0, "WARNING: Unhandled user@host-combination\n"); /* XXX */
@ -274,7 +274,7 @@ static int hostfile_parse_line(int token, opal_list_t* updates,
if (1 == cnt) { if (1 == cnt) {
node_name = strdup(argv[0]); node_name = strdup(argv[0]);
} else if (2 == cnt) { } else if (2 == cnt) {
username = argv[0]; username = strdup(argv[0]);
node_name = strdup(argv[1]); node_name = strdup(argv[1]);
} else { } else {
opal_output(0, "WARNING: Unhandled user@host-combination\n"); /* XXX */ opal_output(0, "WARNING: Unhandled user@host-combination\n"); /* XXX */