Message ID | 1460566660-19241-1-git-send-email-marcandre.lureau@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 13 Apr 2016 18:57:40 +0200 marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> > --- > backends/hostmem-file.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > index b17a1f1..5c4b808 100644 > --- a/backends/hostmem-file.c > +++ b/backends/hostmem-file.c > @@ -121,11 +121,19 @@ file_backend_instance_init(Object *o) > set_mem_path, NULL); > } > > +static void file_backend_instance_finalize(Object *o) > +{ > + HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o); > + > + g_free(fb->mem_path); > +} > + > static const TypeInfo file_backend_info = { > .name = TYPE_MEMORY_BACKEND_FILE, > .parent = TYPE_MEMORY_BACKEND, > .class_init = file_backend_class_init, > .instance_init = file_backend_instance_init, > + .instance_finalize = file_backend_instance_finalize, > .instance_size = sizeof(HostMemoryBackendFile), > }; >
On 14/04/2016 13:34, Igor Mammedov wrote: > On Wed, 13 Apr 2016 18:57:40 +0200 > marcandre.lureau@redhat.com wrote: > >> From: Marc-André Lureau <marcandre.lureau@redhat.com> >> >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > Reviewed-by: Igor Mammedov <imammedo@redhat.com> Igor, feel free to send a pull request or even to add yourself as hostmem maintainer. Paolo
On Thu, 14 Apr 2016 15:24:10 +0200 Paolo Bonzini <pbonzini@redhat.com> wrote: > On 14/04/2016 13:34, Igor Mammedov wrote: > > On Wed, 13 Apr 2016 18:57:40 +0200 > > marcandre.lureau@redhat.com wrote: > > > >> From: Marc-André Lureau <marcandre.lureau@redhat.com> > >> > >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > > Reviewed-by: Igor Mammedov <imammedo@redhat.com> > > Igor, feel free to send a pull request or even to add yourself as > hostmem maintainer. I can't send pull signed pull request as I don't have a trusted key. > > Paolo
On 14/04/2016 17:44, Igor Mammedov wrote: > On Thu, 14 Apr 2016 15:24:10 +0200 > Paolo Bonzini <pbonzini@redhat.com> wrote: > >> On 14/04/2016 13:34, Igor Mammedov wrote: >>> On Wed, 13 Apr 2016 18:57:40 +0200 >>> marcandre.lureau@redhat.com wrote: >>> >>>> From: Marc-André Lureau <marcandre.lureau@redhat.com> >>>> >>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> >>> Reviewed-by: Igor Mammedov <imammedo@redhat.com> >> >> Igor, feel free to send a pull request or even to add yourself as >> hostmem maintainer. > I can't send pull signed pull request as I don't have a trusted key. Ok, then I guess this will have to wait for 2.7. No big deal, it's really minor. Marc-André, please remind me when I'm back. :) Paolo
Paolo Bonzini <pbonzini@redhat.com> writes: > On 14/04/2016 17:44, Igor Mammedov wrote: >> On Thu, 14 Apr 2016 15:24:10 +0200 >> Paolo Bonzini <pbonzini@redhat.com> wrote: >> >>> On 14/04/2016 13:34, Igor Mammedov wrote: >>>> On Wed, 13 Apr 2016 18:57:40 +0200 >>>> marcandre.lureau@redhat.com wrote: >>>> >>>>> From: Marc-André Lureau <marcandre.lureau@redhat.com> >>>>> >>>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> >>>> Reviewed-by: Igor Mammedov <imammedo@redhat.com> >>> >>> Igor, feel free to send a pull request or even to add yourself as >>> hostmem maintainer. >> I can't send pull signed pull request as I don't have a trusted key. Needs fixing. > Ok, then I guess this will have to wait for 2.7. No big deal, it's > really minor. Marc-André, please remind me when I'm back. :) Yes, no big deal, but I could do a pull request for 2.6 if that's okay with Paolo.
On 15/04/2016 08:56, Markus Armbruster wrote: > Paolo Bonzini <pbonzini@redhat.com> writes: > >> On 14/04/2016 17:44, Igor Mammedov wrote: >>> On Thu, 14 Apr 2016 15:24:10 +0200 >>> Paolo Bonzini <pbonzini@redhat.com> wrote: >>> >>>> On 14/04/2016 13:34, Igor Mammedov wrote: >>>>> On Wed, 13 Apr 2016 18:57:40 +0200 >>>>> marcandre.lureau@redhat.com wrote: >>>>> >>>>>> From: Marc-André Lureau <marcandre.lureau@redhat.com> >>>>>> >>>>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> >>>>> Reviewed-by: Igor Mammedov <imammedo@redhat.com> >>>> >>>> Igor, feel free to send a pull request or even to add yourself as >>>> hostmem maintainer. >>> I can't send pull signed pull request as I don't have a trusted key. > > Needs fixing. > >> Ok, then I guess this will have to wait for 2.7. No big deal, it's >> really minor. Marc-André, please remind me when I'm back. :) > > Yes, no big deal, but I could do a pull request for 2.6 if that's okay > with Paolo. I'm always okay with doing less work, and I obviously trust anyone who has already sent a pull request to Peter (plus some that haven't). Paolo
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index b17a1f1..5c4b808 100644 --- a/backends/hostmem-file.c +++ b/backends/hostmem-file.c @@ -121,11 +121,19 @@ file_backend_instance_init(Object *o) set_mem_path, NULL); } +static void file_backend_instance_finalize(Object *o) +{ + HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o); + + g_free(fb->mem_path); +} + static const TypeInfo file_backend_info = { .name = TYPE_MEMORY_BACKEND_FILE, .parent = TYPE_MEMORY_BACKEND, .class_init = file_backend_class_init, .instance_init = file_backend_instance_init, + .instance_finalize = file_backend_instance_finalize, .instance_size = sizeof(HostMemoryBackendFile), };