Skip to content

Commit 99fedcb

Browse files
committed
fs/base: silence a memory leak in mca_fs_base_get_fstype()
Fixes CID 1351211
1 parent 9376b03 commit 99fedcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mca/fs/base/fs_base_get_parent_dir.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
13-
* Copyright (c) 2015 Research Organization for Information Science
13+
* Copyright (c) 2015-2016 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* $COPYRIGHT$
1616
*
@@ -106,6 +106,7 @@ int mca_fs_base_get_fstype(char *fname )
106106
char *dir;
107107
mca_fs_base_get_parent_dir (fname, &dir );
108108
ret = opal_path_nfs (dir, &fstype);
109+
free(dir);
109110
if ( false == ret ) {
110111
return ompio_type;
111112
}

0 commit comments

Comments
 (0)