On (20/02/14 16:18), Jakub Hrozek wrote: >On Thu, Feb 20, 2014 at 01:56:41PM +0100, Lukas Slebodnik wrote: >> On (20/02/14 13:36), Pavel Březina wrote: >> >Seen this during review... this will save us from creating new >> >temporary context in each iteration. >> >> >From 7b3834b506a362e3b25cf50539ef65c9e10810d6 Mon Sep 17 00:00:00 2001 >> >From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com> >> >Date: Thu, 20 Feb 2014 13:34:53 +0100 >> >Subject: [PATCH] fill_services(): use talloc_free_children() >> > >> >This will save us from creating new temporary context in each iteration. >> >--- >> > src/responder/nss/nsssrv_services.c | 7 ++++--- >> > 1 file changed, 4 insertions(+), 3 deletions(-) >> > >> >diff --git a/src/responder/nss/nsssrv_services.c >> >b/src/responder/nss/nsssrv_services.c >> >index >> >67ca5d5924d34dc732b906ffda0edbabf91001fd..dc92a7423dae219afb874326f9a43107a3eead77 >> > 100644 >> >--- a/src/responder/nss/nsssrv_services.c >> >+++ b/src/responder/nss/nsssrv_services.c >> >@@ -610,6 +610,9 @@ fill_service(struct sss_packet *packet, >> > size_t blen; >> > struct sized_string alias; >> > >> >+ tmp_ctx = talloc_new(NULL); >> >+ if (!tmp_ctx) return ENOMEM; >> >+ >> > /* FIXME: Should we account for fully-qualified >> > * service names? >> > */ >> >@@ -622,9 +625,7 @@ fill_service(struct sss_packet *packet, >> > rsize = 0; >> > >> > for (i = 0; i < msg_count; i++) { >> >- talloc_zfree(tmp_ctx); >> >- tmp_ctx = talloc_new(NULL); >> >- if (!tmp_ctx) return ENOMEM; >> >+ talloc_free_children(tmp_ctx); >> > >> > msg = msgs[i]; >> > >> >-- >> >1.7.11.7 >> > >> Similar patch has already been sent to the list >> https://lists.fedorahosted.org/pipermail/sssd-devel/2013-October/017159.html >> >> Sorry, but your version only sub-set of Jakub's patch >> >> NACK >> >> LS > >Feel free to take over my patch, I don't have time to work on it now. bump,
Jakub, Pavel Could you send new version of patch? LS _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel