summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/utils.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fbed00bbc..55ed61207 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-10  Clint Adams  <clint@zsh.org>
+
+	* 17810 (Martin Waitz): Src/utils.c: bung up memory leak with
+	POSIX.1e capabilities.
+
 2002-10-10  Oliver Kiddle  <opk@zsh.org>
 
 	* 17794: Src/builtin.c, Src/params.c: fix bugs with tied parameters
diff --git a/Src/utils.c b/Src/utils.c
index e5050ac79..a043c101f 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3677,7 +3677,10 @@ privasserted(void)
 	    cap_flag_value_t val;
 	    cap_value_t n;
 	    for(n = 0; !cap_get_flag(caps, n, CAP_EFFECTIVE, &val); n++)
-		if(val) return 1;
+		if(val) {
+		    cap_free(caps);
+		    return 1;
+		}
 	    cap_free(caps);
 	}
     }