From 117e6feaa1e51eefed098f8a808e0b10827801f1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 12 Feb 2015 13:07:46 -0800 Subject: [PATCH] shmem sysv: ensure we don't shmdt(NULL) This was CID 71999. --- opal/mca/shmem/sysv/shmem_sysv_component.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/mca/shmem/sysv/shmem_sysv_component.c b/opal/mca/shmem/sysv/shmem_sysv_component.c index c984755e7f..f0129cdbd7 100644 --- a/opal/mca/shmem/sysv/shmem_sysv_component.c +++ b/opal/mca/shmem/sysv/shmem_sysv_component.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2011 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. @@ -211,7 +211,7 @@ sysv_runtime_query(mca_base_module_t **module, int *priority, const char *hint) } out: - if ((char *)-1 != addr) { + if (NULL != addr && (char *)-1 != addr) { shmdt(addr); } return OPAL_SUCCESS;