On Thu, Oct 16, 2014 at 02:18:49PM +0200, Christian Hesse wrote: > Christian Hesse <[email protected]> on Thu, 2014/10/16 13:54: > > ALPM_SIG_DATABASE_OPTIONAL); @@ -260,6 +261,8 @@ int SYMEXPORT > > alpm_db_update(int force, alpm_db_t *db) > > _alpm_dload_payload_reset(&payload); } > > > > + free(final_db_url); > > + > > if(ret != -1 && sig_ret != -1) { > > break; > > } > > But it starts crashing now... In curl_download_internal() we do: > > *final_url = effective_url; > > So no allocation. Either free() is wrong or we have to use strdup() here. No?
Well strdup would be silly since we're just trying to make sure that it has an owner to deallocate it. Yeah, this is just a const char* handed to us from curl... I suppose your original patch is correct, then.
