>>> + } else { >>> + to->code = VIR_ERR_NO_MEMORY; >>> + to->domain = VIR_FROM_NONE; >>> + to->level = VIR_ERR_ERROR; >> >> Should we do a VIR_FREE(to->message); so that nothing that was there >> before somehow remains... I don't think either agent or monitor> "lastError" is reset until Dispose time. > > Won't hurt but probably will not be used by monitor or agent. If thread > error is not allocated message is NULL upon return, after error is allocated we never > hit this OOM branch anymore. Of course hypotetical client can bring @to > with message already set so this a bit future proof. > > I think then we can leave reset and then set these 3 fields. > > Nikolay > You have commit access and my R-by regardless of whether you add the VIR_FREE or not. I leave the rest to you ;-) John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list