sec/munge: plug a memory leak
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
родитель
f2d6584189
Коммит
a59dfd7b14
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015 Intel, Inc. All rights reserved.
|
* Copyright (c) 2015 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -69,7 +69,7 @@ static int init(void)
|
|||||||
|
|
||||||
static void finalize(void)
|
static void finalize(void)
|
||||||
{
|
{
|
||||||
if (initialized) {
|
if (initialized && !refresh) {
|
||||||
free(my_cred.credential);
|
free(my_cred.credential);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ static int get_my_cred(opal_process_name_t *my_id,
|
|||||||
my_cred.size = strlen(my_cred.credential)+1;
|
my_cred.size = strlen(my_cred.credential)+1;
|
||||||
}
|
}
|
||||||
cred->method = strdup("munge");
|
cred->method = strdup("munge");
|
||||||
cred->credential = strdup(my_cred.credential);
|
cred->credential = my_cred.credential;
|
||||||
cred->size = my_cred.size;
|
cred->size = my_cred.size;
|
||||||
} else {
|
} else {
|
||||||
rc = OPAL_ERROR;
|
rc = OPAL_ERROR;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user