> -----Original Message-----
> From: [email protected] [mailto:linux-rdma-
> [email protected]] On Behalf Of Hal Rosenstock
> Sent: Tuesday, March 12, 2013 9:45 AM
> To: linux-rdma ([email protected])
> Subject: [PATCH] opensm: Fix issues causing const warnings for strings
> 
> 
> Signed-off-by: Hal Rosenstock <[email protected]>
> ---

[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?  

Ira

[snip]
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to