1
1

fixed crash in orte-ps caused by calls to OBJ_RELEASE on an opal_event_t object.

This commit was SVN r24020.
Этот коммит содержится в:
Nathan Hjelm 2010-11-09 18:41:43 +00:00
родитель f156162289
Коммит 986265fc6e

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

@ -9,6 +9,8 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2010 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -50,7 +52,8 @@ static int error_exit;
static void quicktime_cb(int fd, short event, void *cbdata) static void quicktime_cb(int fd, short event, void *cbdata)
{ {
if (NULL != quicktime) { if (NULL != quicktime) {
OBJ_RELEASE(quicktime); free(quicktime);
quicktime = NULL;
} }
error_exit = ORTE_ERR_SILENT; error_exit = ORTE_ERR_SILENT;
/* declare it fired */ /* declare it fired */
@ -64,7 +67,8 @@ static void send_cbfunc(int status, orte_process_name_t* sender,
/* cancel the timer */ /* cancel the timer */
if (NULL != quicktime) { if (NULL != quicktime) {
opal_event_evtimer_del(quicktime); opal_event_evtimer_del(quicktime);
OBJ_RELEASE(quicktime); free(quicktime);
quicktime = NULL;
} }
/* declare the work done */ /* declare the work done */
timer_fired = true; timer_fired = true;
@ -79,7 +83,8 @@ static void recv_info(int status, orte_process_name_t* sender,
/* cancel the timer */ /* cancel the timer */
if (NULL != quicktime) { if (NULL != quicktime) {
opal_event_evtimer_del(quicktime); opal_event_evtimer_del(quicktime);
OBJ_RELEASE(quicktime); free (quicktime);
quicktime = NULL;
} }
/* xfer the answer */ /* xfer the answer */
if (ORTE_SUCCESS != (rc = opal_dss.copy_payload(&answer, buffer))) { if (ORTE_SUCCESS != (rc = opal_dss.copy_payload(&answer, buffer))) {
@ -190,7 +195,8 @@ int orte_util_comm_report_event(orte_comm_event_t ev)
/* cancel the timer */ /* cancel the timer */
if (NULL != quicktime) { if (NULL != quicktime) {
opal_event_evtimer_del(quicktime); opal_event_evtimer_del(quicktime);
OBJ_RELEASE(quicktime); free(quicktime);
quicktime = NULL;
} }
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
OBJ_DESTRUCT(&answer); OBJ_DESTRUCT(&answer);
@ -277,7 +283,8 @@ int orte_util_comm_query_job_info(const orte_process_name_t *hnp, orte_jobid_t j
/* cancel the timer */ /* cancel the timer */
if (NULL != quicktime) { if (NULL != quicktime) {
opal_event_evtimer_del(quicktime); opal_event_evtimer_del(quicktime);
OBJ_RELEASE(quicktime); free(quicktime);
quicktime = NULL;
} }
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
OBJ_DESTRUCT(&answer); OBJ_DESTRUCT(&answer);
@ -383,7 +390,8 @@ int orte_util_comm_query_node_info(const orte_process_name_t *hnp, char *node,
/* cancel the timer */ /* cancel the timer */
if (NULL != quicktime) { if (NULL != quicktime) {
opal_event_evtimer_del(quicktime); opal_event_evtimer_del(quicktime);
OBJ_RELEASE(quicktime); free (quicktime);
quicktime = NULL;
} }
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
OBJ_DESTRUCT(&answer); OBJ_DESTRUCT(&answer);
@ -494,7 +502,8 @@ int orte_util_comm_query_proc_info(const orte_process_name_t *hnp, orte_jobid_t
/* cancel the timer */ /* cancel the timer */
if (NULL != quicktime) { if (NULL != quicktime) {
opal_event_evtimer_del(quicktime); opal_event_evtimer_del(quicktime);
OBJ_RELEASE(quicktime); free(quicktime);
quicktime = NULL;
} }
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
OBJ_DESTRUCT(&answer); OBJ_DESTRUCT(&answer);