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] find_and_open_script: Fix failed fdopen


On 01/23/2012 04:03 PM, Jan Kratochvil wrote:
> @@ -513,6 +513,17 @@ find_and_open_script (const char *script_file, int search_path,
>    do_cleanups (old_cleanups);
>  
>    *streamp = fdopen (fd, FOPEN_RT);
> +  if (*streamp == NULL)
> +    {
> +      int save_errno = errno;
> +
> +      if (full_pathp)
> +	xfree (*full_pathp);
> +      do_cleanups (old_cleanups);

This do_cleanups doesn't look right.  From the patch context, there's
already do_cleanups(old_cleanups) call a bit above.

-- 
Pedro Alves


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