Hey Alex,

Argh!  You can forget about this patch.  It is a memleak, but I see why
an earlier author did it this way.  I'll solve the memleak in a
different way in a different patch series.

Al

On Thu, 2011-11-10 at 16:51 -0800, Albert Chu wrote:
> Strings may have been already strduped from config file parsing.
> 
> Signed-off-by: Albert L. Chu <[email protected]>
> ---
>  opensm/main.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/opensm/main.c b/opensm/main.c
> index f7a6d83..10cbef5 100644
> --- a/opensm/main.c
> +++ b/opensm/main.c
> @@ -553,6 +553,8 @@ int osm_manager_loop(osm_subn_opt_t * p_opt, osm_opensm_t 
> * p_osm)
>  }
>  
>  #define SET_STR_OPT(opt, val) do { \
> +     if (opt) \
> +             free(opt); \
>       opt = val ? strdup(val) : NULL ; \
>  } while (0)
>  
-- 
Albert Chu
[email protected]
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory


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