From 24ef1d7ab6e7931630c0e0fd907f6c3f4cc37991 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Fri, 6 Feb 2015 14:07:01 +0000 Subject: [PATCH] Drop cgetclose() from getdiskbyname(). This was a local addition to the original change from NetBSD. Being this libc there is some chance for it to interfere with user's cget*() functions usage. The memory leak was finely plugged by r278300. Pointed out by: ache --- lib/libc/gen/disklabel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c index 5c7aa96a9a0a..8780573d1c5d 100644 --- a/lib/libc/gen/disklabel.c +++ b/lib/libc/gen/disklabel.c @@ -162,6 +162,5 @@ getdiskbyname(const char *name) dp->d_magic = DISKMAGIC; dp->d_magic2 = DISKMAGIC; free(buf); - (void)cgetclose(); return (dp); }