Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r2044
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2010-05-04 04:00:13


bgoglin_at_[hidden], le Tue 04 May 2010 01:32:00 -0400, a écrit :
> @@ -326,6 +330,10 @@
> if (nr_tids == max_tids) {
> max_tids += 8;
> tids = realloc(tids, max_tids*sizeof(pid_t));
> + if (!tids) {
> + errno = ENOMEM;
> + return -1;
> + }
> }
> if (!strcmp(dirent->d_name, ".") || !strcmp(dirent->d_name, ".."))
> continue;

We also need to free the original allocated array.

Samuel