mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.5] nfsd/export.c memleak.
@ 2003-03-11 14:58 Oleg Drokin
  2003-03-11 22:06 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Drokin @ 2003-03-11 14:58 UTC (permalink / raw)
  To: neilb, torvalds, linux-kernel

Hello!

     There is trivial memleak on error exit path in nfsd.
     See the patch below.
     Found with help of smatch + enhanced unfree script.

Bye,
    Oleg

===== fs/nfsd/export.c 1.71 vs edited =====
--- 1.71/fs/nfsd/export.c	Tue Feb 25 13:08:50 2003
+++ edited/fs/nfsd/export.c	Tue Mar 11 17:55:18 2003
@@ -294,7 +294,10 @@
 
 	/* client */
 	len = qword_get(&mesg, buf, PAGE_SIZE);
-	if (len <= 0) return -EINVAL;
+	if (len <= 0) {
+		err = -EINVAL;
+		goto out;
+	}
 	err = -ENOENT;
 	dom = auth_domain_find(buf);
 	if (!dom)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-11 21:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-11 14:58 [2.5] nfsd/export.c memleak Oleg Drokin
2003-03-11 22:06 ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®