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: [RFA] Fix other memory leak in solib_target_current_sos


>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre>    library_list = solib_target_parse_libraries (library_document);
Pierre>    if (library_list == NULL)
Pierre> -    return NULL;
Pierre> +    {
Pierre> +      xfree (library_document);
Pierre> +      return NULL;
Pierre> +    }

It seems to me that you could unconditionally free it here, before the if.

Tom


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