summaryrefslogtreecommitdiffstats
path: root/bin/ps
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2009-11-17 07:29:35 +0000
committernetchild <netchild@FreeBSD.org>2009-11-17 07:29:35 +0000
commit45887d4e283c9ac9f5830e01dd3a82881571fded (patch)
tree58d28c162fc816ea060da3b2056d33635a4d5e56 /bin/ps
parentc29c057cc62e07e8f241c3e6c45e89075ae21b00 (diff)
downloadFreeBSD-src-45887d4e283c9ac9f5830e01dd3a82881571fded.zip
FreeBSD-src-45887d4e283c9ac9f5830e01dd3a82881571fded.tar.gz
Fix small resource leak (memory).
Reviewed by: gad MFC after: 1 week
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/keyword.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c
index 609c52e..4524d99 100644
--- a/bin/ps/keyword.c
+++ b/bin/ps/keyword.c
@@ -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);
}
OpenPOWER on IntegriCloud