[llvm-commits] [llvm] r63907 - /llvm/trunk/tools/gold/gold-plugin.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Feb 6 19:15:02 PST 2009
Török Edwin wrote:
> On 2009-02-06 03:58, Nick Lewycky wrote:
>> Author: nicholas
>> Date: Thu Feb 5 19:58:34 2009
>> New Revision: 63907
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=63907&view=rev
>> Log:
>> Free the buffer.
>>
>> Modified:
>> llvm/trunk/tools/gold/gold-plugin.cpp
>>
>> Modified: llvm/trunk/tools/gold/gold-plugin.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=63907&r1=63906&r2=63907&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/tools/gold/gold-plugin.cpp (original)
>> +++ llvm/trunk/tools/gold/gold-plugin.cpp Thu Feb 5 19:58:34 2009
>> @@ -180,13 +180,10 @@
>> file->name,
>> file->offset,
>> strerror(errno));
>> - free(buf);
>> return LDPS_ERR;
>> }
>> - if (!lto_module_is_object_file_in_memory(buf, file->filesize)) {
>> - free(buf);
>> + if (!lto_module_is_object_file_in_memory(buf, file->filesize))
>> return LDPS_OK;
>>
>
> Why not free the buffer here? Gold will process the file on LDPS_OK, right?
Right you are. Both of the free(buf)'s in the segment of the patch you
quoted should be kept.
Thanks again!
Nick
> Best regards,
> --Edwin
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list