[pacman-dev] [PATCH] Add remove counterparts to alpm_option_add_* functions
Allan McRae
mcrae_allan at hotmail.com
Sun Dec 23 19:50:23 EST 2007
Dan McGee wrote:
> On Dec 23, 2007 6:23 PM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
>
>> No. You mustn't free it in add_cachedir, because alpm_list_add just adds
>> a POINTER to the (handle->cachedirs) list. (So you can always think
>> alpm_list as a list of pointers.)
>>
Fixed in attachment. For some reason I thought there was a strdup in
the alpm_list_add statement but clearly there wasn't.
> Ok, enough of this junk. Sorry to rain down on the holiday spirit, but
> can we please not be cryptic on this mailing list with cute little
> remarks and smiley faces?
>
> Something like this would have saved us all 5 minutes of our time.
> "I noticed that newcachedir was not freed in remove_cachedir- as far
> as I can tell, it needs to be freed because we aren't adding it to a
> list and it isn't needed outside of the function."
>
> -Dan
Fair enough. This is probably the result of me being new to the code
base and making stupid trivial mistakes. However, point taken.
Allan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-remove-counterparts-to-alpm_option_add_-functio.patch
Type: text/x-patch
Size: 5813 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20071224/eea0fe23/attachment.bin>
More information about the pacman-dev
mailing list