From f2359a2473ad2b88321e96e7fe93869307ca6aa8 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Sat, 13 Mar 2010 11:08:57 +0000 Subject: [PATCH] Free the memory allocated via strdup. PR: bin/113881 Submitted by: Alexander Drozdov dzal_mail mtu-net.ru Approved by: rrs (mentor) MFC after: 1 week --- sbin/sysctl/sysctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 5d0025bbcb1c..d96450b3bd5a 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -382,6 +382,7 @@ S_timeval(int l2, void *p) if (*p2 == '\n') *p2 = '\0'; fputs(p1, stdout); + free(p1); return (0); }