lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071019140530.GF3778@stusta.de>
Date:	Fri, 19 Oct 2007 16:05:30 +0200
From:	Adrian Bunk <bunk@...nel.org>
To:	Latchesar Ionkov <lucho@...kov.net>,
	Eric Van Hensbergen <ericvh@...il.com>
Cc:	v9fs-developer@...ts.sourceforge.net, rminnich@...dia.gov,
	linux-kernel@...r.kernel.org
Subject: [2.6 patch] fs/9p/v9fs.c: memleak fix

This patch fixes a memory leak introduced by
commit ba17674fe02909fef049fd4b620a2805bdb8c693.

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@...nel.org>

---
--- linux-2.6/fs/9p/v9fs.c.old	2007-10-19 15:56:06.000000000 +0200
+++ linux-2.6/fs/9p/v9fs.c	2007-10-19 15:57:00.000000000 +0200
@@ -152,26 +152,27 @@ static void v9fs_parse_options(struct v9
 		case Opt_access:
 			s = match_strdup(&args[0]);
 			v9ses->flags &= ~V9FS_ACCESS_MASK;
 			if (strcmp(s, "user") == 0)
 				v9ses->flags |= V9FS_ACCESS_USER;
 			else if (strcmp(s, "any") == 0)
 				v9ses->flags |= V9FS_ACCESS_ANY;
 			else {
 				v9ses->flags |= V9FS_ACCESS_SINGLE;
 				v9ses->uid = simple_strtol(s, &e, 10);
 				if (*e != '\0')
 					v9ses->uid = ~0;
 			}
+			kfree(s);
 			break;
 
 		default:
 			continue;
 		}
 	}
 }
 
 /**
  * v9fs_session_init - initialize session
  * @v9ses: session information structure
  * @dev_name: device being mounted
  * @data: options

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ