From ec6c5bf5e92d9b1269882d3e04537304327fa266 Mon Sep 17 00:00:00 2001 From: Josh Hursey Date: Tue, 12 May 2009 14:13:07 +0000 Subject: [PATCH] Make sure that when we destruct the pointer array that we set the address to NULL and size to 0. This will help to flag accidental usage of a destructed pointer array object. This commit was SVN r21216. --- opal/class/opal_pointer_array.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opal/class/opal_pointer_array.c b/opal/class/opal_pointer_array.c index d84f5a8060..827fd6b7a2 100644 --- a/opal/class/opal_pointer_array.c +++ b/opal/class/opal_pointer_array.c @@ -59,8 +59,11 @@ static void opal_pointer_array_destruct(opal_pointer_array_t *array) /* free table */ if( NULL != array->addr) { free(array->addr); + array->addr = NULL; } + array->size = 0; + OBJ_DESTRUCT(&array->lock); }