Blob Blame History Raw
From 4eeeb4128fd1b8e0113b3282c4031edda19016b1 Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Thu, 7 Nov 2019 00:19:59 +0900
Subject: [PATCH 26/29] modpost: free ns_deps_buf.p after writing ns_deps files
Git-commit: 0241ea8cae19b49fc1b1459f7bbe9a77f4f9cc89
References: jsc#SLE-10158
Patch-mainline: v5.5-rc1

buf_write() allocates memory. Free it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Jessica Yu <jeyu@suse.de>
---
 scripts/mod/modpost.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 5ce4b931f766..6927d849755a 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2662,6 +2662,8 @@ static void write_namespace_deps_files(void)
 		sprintf(fname, "%s.ns_deps", mod->name);
 		write_if_changed(&ns_deps_buf, fname);
 	}
+
+	free(ns_deps_buf.p);
 }
 
 struct ext_sym_list {
-- 
2.16.4