about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2002-10-11 01:08:18 +0000
committerClint Adams <clint@users.sourceforge.net>2002-10-11 01:08:18 +0000
commit6c998a07abd19822efd77d6fd6d919464d68ba44 (patch)
treea9528e308476ed6c68daefaec19c885c56615a6b /Src
parent7a0ab2444d96365a7aec2c55a4e470513d8e4a10 (diff)
downloadzsh-6c998a07abd19822efd77d6fd6d919464d68ba44.tar.gz
zsh-6c998a07abd19822efd77d6fd6d919464d68ba44.tar.xz
zsh-6c998a07abd19822efd77d6fd6d919464d68ba44.zip
* 17810 (Martin Waitz): Src/utils.c: bung up memory leak with
  POSIX.1e capabilities.
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c5
1 files changed, 4 insertions, 1 deletions
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);
 	}
     }