On 3/12/2013 10:12 AM, Weiny, Ira wrote: >> -----Original Message----- >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- >> ow...@vger.kernel.org] On Behalf Of Hal Rosenstock >> Sent: Tuesday, March 12, 2013 9:45 AM >> To: linux-rdma (linux-rdma@vger.kernel.org) >> Subject: [PATCH] opensm: Fix issues causing const warnings for strings >> >> >> Signed-off-by: Hal Rosenstock <h...@mellanox.com> >> --- > > [snip] > >> >> diff --git a/opensm/main.c b/opensm/main.c index 1a061a8..db5429a 100644 >> --- a/opensm/main.c >> +++ b/opensm/main.c >> @@ -718,7 +718,7 @@ int main(int argc, char *argv[]) >> optind = 0; /* reset command line */ >> >> if (!config_file) >> - config_file = OSM_DEFAULT_CONFIG_FILE; >> + config_file = strdup(OSM_DEFAULT_CONFIG_FILE); >> > > Why is the strdup here but not on the optarg above? > > Also, is this free'ed anywhere? Can the config file change at run time? I > don't think it can but perhaps you are moving that direction? > > Also, perhaps the strdup should be within osm_subn_parse_conf_file?
Version 2 patch to follow shortly. -- Hal > > Ira > > [snip] > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html