[PATCH 7/8 v2] nss: aiforaf: Decrease stack size by scoping off large buffers

Kristina Hanicova khanicov at redhat.com
Wed Aug 30 13:27:25 UTC 2023


On Wed, Aug 30, 2023 at 3:17 PM Peter Krempa <pkrempa at redhat.com> wrote:

> The 'buf', 'sa' and 'hints' stack allocated helper variables are never
> used together. Decrease the stack memory usage by scoping them off into
> do-while blocks.
>
> In this instance we do not want to use dynamic allocation as this is the
> NSS module.
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>
> v2: Moved two error checks containing a 'continue' out of the 'do-while'
>     loop blocks
>
> New pipeline:
> https://gitlab.com/pipo.sk/libvirt/-/pipelines/986529301
>
>
>  tools/nss/libvirt_nss.c | 87 ++++++++++++++++++++++++-----------------
>  1 file changed, 51 insertions(+), 36 deletions(-)
>

Reviewed-by: Kristina Hanicova <khanicov at redhat.com>

Kristina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230830/ba62b6c6/attachment-0001.htm>


More information about the libvir-list mailing list