[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-bugs
Subject: bin/17084: memory leak in getcap.c (libc)
From: vova () express ! ru
Date: 2000-02-29 23:20:14
[Download RAW message or body]
> Number: 17084
> Category: bin
> Synopsis: memory leak in getcap.c (libc)
> Confidential: no
> Severity: non-critical
> Priority: medium
> Responsible: freebsd-bugs
> State: open
> Quarter:
> Keywords:
> Date-Required:
> Class: sw-bug
> Submitter-Id: current-users
> Arrival-Date: Tue Feb 29 15:30:01 PST 2000
> Closed-Date:
> Last-Modified:
> Originator: Vladimir B. Grebenschikov
> Release: FreeBSD-4.0-CURRENT
> Organization:
TSB Russian Express
> Environment:
FreeBSD lightning.express.ru 4.0-CURRENT FreeBSD 4.0-CURRENT #3: Sun Feb 27 09:26:03 \
MSK 2000 root@lightning.express.ru:/usr/local/src/fbsd/src/sys/compile/LIGHTNING \
i386
> Description:
Compile ang run program below
and all your memory will eaten very quckly
each itteration "eats" about 1.5k memory
---
I have dip a bit into problem and found that memory leaks in
cgetent() called from login_getclassbyname()
> How-To-Repeat:
#include <stdio.h>
#include <sys/types.h>
#include <login_cap.h>
#include <pwd.h>
main()
{
struct passwd *ent;
int uid;
ent = getpwnam("nobody");
while(1) {
login_cap_t *lc;
uid = ent->pw_uid;
if ( (lc = login_getclassbyname("root", ent)) == NULL )
perror("login_getclassbyname: ");
login_close(lc);
}
}
> Fix:
don't know
> Release-Note:
> Audit-Trail:
> Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic