This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: readline/kill.c, resource leak


Looks good.

msnyder@sonic.net writes:
> 2007-07-31  Michael Snyder  <msnyder@access-company.com>
>
> 	* kill.c (rl_yank_nth_arg_internal): Resource leak.
>
> Index: kill.c
> ===================================================================
> RCS file: /cvs/src/src/readline/kill.c,v
> retrieving revision 1.6
> diff -p -r1.6 kill.c
> *** kill.c	5 May 2006 18:26:12 -0000	1.6
> --- kill.c	1 Aug 2007 02:01:15 -0000
> *************** rl_yank_nth_arg_internal (count, ignore,
> *** 582,587 ****
> --- 582,589 ----
>     if (!arg || !*arg)
>       {
>         rl_ding ();
> +       if (arg)
> + 	free (arg);
>         return -1;
>       }
>   


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]