From 32391a53e5973681e2df204457bd193db618ffaf Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Fri, 26 Jul 2019 15:40:25 +0100
Subject: [PATCH] inspect-library: Reuse a buffer between iterations

There's no point in freeing the buffer every time: getline() is
designed to reuse it.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 helpers/inspect-library.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/helpers/inspect-library.c b/helpers/inspect-library.c
index 8418e210a..b83ca4a86 100644
--- a/helpers/inspect-library.c
+++ b/helpers/inspect-library.c
@@ -230,9 +230,6 @@ main (int argc,
                       free (merged_string);
                     }
                 }
-              free (line);
-              line = NULL;
-              len = 0;
             }
         }
       free (line);
-- 
GitLab