opal/dss: silence coverity issues
CID 1269988 Use after free (USE_AFTER_FREE) CID 1269987 Use after free (USE_AFTER_FREE) Both are false positives as convert is always overwritten by the call to opal_dss_unpack_string(). Set convert to prevent this issue from re-appearing. Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
6b86e74218
Коммит
32d4d7b6ea
@ -1,3 +1,4 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
@ -9,7 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
@ -430,6 +431,7 @@ int opal_dss_unpack_float(opal_buffer_t *buffer, void *dest,
|
||||
tmp = strtof(convert, NULL);
|
||||
memcpy(&desttmp[i], &tmp, sizeof(tmp));
|
||||
free(convert);
|
||||
convert = NULL;
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
@ -460,6 +462,7 @@ int opal_dss_unpack_double(opal_buffer_t *buffer, void *dest,
|
||||
tmp = strtod(convert, NULL);
|
||||
memcpy(&desttmp[i], &tmp, sizeof(tmp));
|
||||
free(convert);
|
||||
convert = NULL;
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user