Skip to content
Snippets Groups Projects
Commit 4db25cd8 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Switch struct component to separate allocation.

parent a0d44c4a
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -181,9 +181,9 @@ initAFiledataFileWriteAtReblock(const char *filename, size_t bufSize)
numBlockBuf = 2;
bufSize = blockSize * 2;
}
struct fileMPIFWAR *of = Malloc(sizeof(*of) + sizeof(of->collWriteSize[0]) * (size_t) sizePio + nameSize);
struct fileMPIFWAR *of = Malloc(sizeof(*of) + sizeof(of->collWriteSize[0]) * (size_t) sizePio);
of->fh = fh;
of->name = (char *) ((unsigned char *) of + sizeof(*of) + sizeof(of->collWriteSize[0]) * (size_t) sizePio);
of->name = Malloc(nameSize);
memcpy(of->name, filename, nameSize);
{
void *ptr;
......@@ -248,6 +248,8 @@ destroyAFiledataFileWriteAtReblock(void *v)
Free(of->msgs);
Free(of->reqs);
Free(of->pending);
Free(of->name);
of->name = NULL;
Free(of);
return iret == MPI_SUCCESS ? 0 : -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment