On Monday 30 November 2009 05:51:35 pm Alexandre Julliard wrote: > Paul Chitescu <pa...@voip.null.ro> writes: > > > @@ -569,11 +569,11 @@ DWORD svcctl_ChangeServiceConfigW( > > new_entry.config.lpDisplayName = strdupW(lpDisplayName); > > } > > > > - *service->service_entry = new_entry; > > - save_service_config(service->service_entry); > > + err = save_service_config(&new_entry); > > + if (ERROR_SUCCESS == err) *service->service_entry = new_entry; > > service_unlock(service->service_entry); > > This can't work, the strings have been freed already. > > -- > Alexandre Julliard > julli...@winehq.org
Oh, I see it now. This means that currently the old strings are leaked if the new strings provided are NULL. I'll write a replacement that will free the all the strings of either old entry or new entry at the end (depending if save_service_config succeeds or not).