Skip to content

Commit 188b966

Browse files
committed
ompi/attribute: plug a memory leak in set_value()
OBJ_RELEASE() the previous attribute value if any Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent d94e8c9 commit 188b966

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ompi/attribute/attribute.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,7 @@ static int set_value(ompi_attribute_type_t type, void *object,
11501150
if (MPI_SUCCESS != ret) {
11511151
return ret;
11521152
}
1153+
OBJ_RELEASE(old_attr);
11531154
had_old = true;
11541155
}
11551156

0 commit comments

Comments
 (0)