We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7bbe78d + f900fd6 commit 926d267Copy full SHA for 926d267
oshmem/shmem/c/shmem_free.c
@@ -1,6 +1,7 @@
1
/*
2
* Copyright (c) 2013-2015 Mellanox Technologies, Inc.
3
* All rights reserved.
4
+ * Copyright (c) 2018 IBM Corporation. All rights reserved.
5
* $COPYRIGHT$
6
*
7
* Additional copyrights may follow
@@ -41,7 +42,12 @@ static inline void _shfree(void* ptr)
41
42
{
43
int rc;
44
- RUNTIME_CHECK_INIT(); RUNTIME_CHECK_ADDR(ptr);
45
+ RUNTIME_CHECK_INIT();
46
+ if (NULL == ptr) {
47
+ return;
48
+ }
49
+
50
+ RUNTIME_CHECK_ADDR(ptr);
51
52
#if OSHMEM_SPEC_COMPAT == 1
53
shmem_barrier_all();
0 commit comments