zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: cap leak
@ 2002-10-11  1:04 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2002-10-11  1:04 UTC (permalink / raw)
  To: zsh-workers

This patch is from Martin Waitz, who noticed that caps wouldn't be freed
if(val).

--- Src/utils.c.orig    2002-10-10 23:59:28.000000000 +0200
+++ Src/utils.c 2002-10-11 00:00:55.000000000 +0200
@@ -3670,7 +3670,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);
 	}
     }


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux pergament 2.4.19-pergament0 #1 Son Aug 25 17:07:17 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=de_DE@euro

Versions of packages zsh depends on:
ii  debconf                  1.2.10          Debian configuration management sy
ii  libc6                    2.2.5-15        GNU C Library: Shared libraries an
ii  libcap1                  1:1.10-12       support for getting/setting POSIX.
ii  libncurses5              5.2.20020112a-8 Shared libraries for terminal hand

-- debconf information excluded


----- End forwarded message -----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-11  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11  1:04 PATCH: cap leak Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).