Blame SOURCES/autofs-5.1.0-fix-leak-in-get_network_proximity.patch

304803
autofs-5.1.0 - fix leak in get_network_proximity()
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
Fix variable net not freed after use in get_network_proximity().
304803
---
304803
 CHANGELOG        |    1 +
304803
 lib/parse_subs.c |    5 +++--
304803
 2 files changed, 4 insertions(+), 2 deletions(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -136,6 +136,7 @@
304803
 - fix memory leak in conf_amd_get_log_options().
304803
 - fix signed comparison in inet_fill_net().
304803
 - fix buffer size checks in get_network_proximity().
304803
+- fix leak in get_network_proximity().
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/lib/parse_subs.c
304803
+++ autofs-5.0.7/lib/parse_subs.c
304803
@@ -446,9 +446,10 @@ unsigned int get_network_proximity(const
304803
 		return PROXIMITY_ERROR;
304803
 
304803
 	net = get_network_number(name);
304803
-	if (net)
304803
+	if (net) {
304803
 		strcpy(name_or_num, net);
304803
-	else {
304803
+		free(net);
304803
+	} else {
304803
 		char this[NI_MAXHOST + 1];
304803
 		char *mask;
304803