You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix potential memory leak in opal_init_gethostname
Fix potential memory leak in opal_get_hostname, where, if the realloc call at
the bottom of the loop fails, the previously allocated memory is not freed and
is leaked.
The linux realloc man page states that if realloc returns NULL then the memory
pointed to by the first parameter to realloc is not freed.
This is fixed by assigning the result of realloc to a temp pointer then
assigning that temp pointer to the original pointer if realloc succeeds.
Signed-off-by: David Wootton <dwootton@us.ibm.com>
0 commit comments