Skip to content

Commit a1a0e32

Browse files
committed
util/hostfile: plug a memory leak
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 6b9343a commit a1a0e32

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

orte/util/hostfile/hostfile.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* reserved.
1414
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
16-
* Copyright (c) 2015-2016 Research Organization for Information Science
16+
* Copyright (c) 2015-2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2016 IBM Corporation. All rights reserved.
1919
* $COPYRIGHT$
@@ -515,6 +515,7 @@ static int hostfile_parse(const char *hostfile, opal_list_t* updates,
515515
}
516516
fclose(orte_util_hostfile_in);
517517
orte_util_hostfile_in = NULL;
518+
orte_util_hostfile_lex_destroy();
518519

519520
unlock:
520521
cur_hostfile_name = NULL;

orte/util/hostfile/hostfile_lex.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2016 Research Organization for Information Science
13+
* Copyright (c) 2016-2017 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
1616
* $COPYRIGHT$
@@ -47,6 +47,7 @@ extern FILE *orte_util_hostfile_in;
4747
extern int orte_util_hostfile_line;
4848
extern bool orte_util_hostfile_done;
4949
extern orte_hostfile_value_t orte_util_hostfile_value;
50+
extern int orte_util_hostfile_lex_destroy (void );
5051

5152
/*
5253
* Make lex-generated files not issue compiler warnings

0 commit comments

Comments
 (0)