From 225f2b01c9c99d88ef356202068e891a2511134c Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 23 Jun 2009 19:47:58 +0000 Subject: [PATCH] Don't release uninitialized objects. This commit was SVN r21499. --- orte/mca/iof/orted/iof_orted_read.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/orte/mca/iof/orted/iof_orted_read.c b/orte/mca/iof/orted/iof_orted_read.c index 531a2b2f5b..e95d401285 100644 --- a/orte/mca/iof/orted/iof_orted_read.c +++ b/orte/mca/iof/orted/iof_orted_read.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2008 The University of Tennessee and The University + * Copyright (c) 2004-2009 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -183,11 +183,17 @@ CLEAN_RETURN: * the read event and closes the file descriptor */ if (rev->tag & ORTE_IOF_STDOUT) { - OBJ_RELEASE(proct->revstdout); + if( NULL != proct->revstdout ) { + OBJ_RELEASE(proct->revstdout); + } } else if (rev->tag & ORTE_IOF_STDERR) { - OBJ_RELEASE(proct->revstderr); + if( NULL != proct->revstderr ) { + OBJ_RELEASE(proct->revstderr); + } } else if (rev->tag & ORTE_IOF_STDDIAG) { - OBJ_RELEASE(proct->revstddiag); + if( NULL != proct->revstddiag ) { + OBJ_RELEASE(proct->revstddiag); + } } /* check to see if they are all done */ if (NULL == proct->revstdout &&