public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dj at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug nss/31936] New: memory leaks in fget*ent.c Date: Thu, 27 Jun 2024 20:48:23 +0000 [thread overview] Message-ID: <bug-31936-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31936 Bug ID: 31936 Summary: memory leaks in fget*ent.c Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: nss Assignee: unassigned at sourceware dot org Reporter: dj at redhat dot com Target Milestone: --- in nss/fgetgrent.c, fgetpwent.c, fgetsgent.c, and fgetspent.c, there's code like this: new_buf = realloc (buffer, buffer_size); if (new_buf == NULL) { . . . } buffer = new_buf; /* Reset the stream. */ if (fsetpos (stream, &pos) != 0) buffer = NULL; In all four files, if realloc() succeeds but fsetpos() fails, the memory "buffer" points to is leaked. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2024-06-27 20:48 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-27 20:48 dj at redhat dot com [this message] 2024-07-01 17:55 ` [Bug nss/31936] " fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31936-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).