Message ID | 20110307100302.GJ5577@calypso.voltaire.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Alex Netes |
Headers | show |
diff --git a/opensm/osm_console.c b/opensm/osm_console.c index fad80ad..7003508 100644 --- a/opensm/osm_console.c +++ b/opensm/osm_console.c @@ -1279,6 +1279,8 @@ static void dump_portguid_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) if (strcmp(p_cmd, "file") == 0) { p_cmd = next_token(p_last); if (p_cmd) { + if (output != out) + fclose(output); output = fopen(p_cmd, "w+"); if (output == NULL) { fprintf(out,