Explorar o código

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  net/9p/protocol.c: Fix a memory leak
Linus Torvalds %!s(int64=14) %!d(string=hai) anos
pai
achega
446cc6345d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      net/9p/protocol.c

+ 1 - 0
net/9p/protocol.c

@@ -674,6 +674,7 @@ int p9dirent_read(char *buf, int len, struct p9_dirent *dirent,
 	}
 
 	strcpy(dirent->d_name, nameptr);
+	kfree(nameptr);
 
 out:
 	return fake_pdu.offset;