Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 07:29:35 +0000 (UTC)
From:      Alexander Leidinger <netchild@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199351 - head/bin/ps
Message-ID:  <200911170729.nAH7TZN7095097@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: netchild
Date: Tue Nov 17 07:29:35 2009
New Revision: 199351
URL: http://svn.freebsd.org/changeset/base/199351

Log:
  Fix small resource leak (memory).
  
  Reviewed by:	gad
  MFC after:	1 week

Modified:
  head/bin/ps/keyword.c

Modified: head/bin/ps/keyword.c
==============================================================================
--- head/bin/ps/keyword.c	Tue Nov 17 07:21:27 2009	(r199350)
+++ head/bin/ps/keyword.c	Tue Nov 17 07:29:35 2009	(r199351)
@@ -330,6 +330,7 @@ findvar(char *p, int user, char **header
 				errx(1, "malloc failed");
 			snprintf(realfmt, rflen, "%s=%s", v->alias, hp);
 			parsefmt(realfmt, user);
+			free(realfmt);
 		}
 		return ((VAR *)NULL);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911170729.nAH7TZN7095097>