[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 14/37: Revert "Make sure to free content dir in procfs"
From: |
Samuel Thibault |
Subject: |
[hurd] 14/37: Revert "Make sure to free content dir in procfs" |
Date: |
Mon, 09 Feb 2015 09:59:10 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to annotated tag upstream/hurd/0.5.git20150208
in repository hurd.
commit 2a340dd3310d0f67a48d6057214e54416d173265
Author: Samuel Thibault <address@hidden>
Date: Fri Dec 26 14:23:10 2014 +0100
Revert "Make sure to free content dir in procfs"
This reverts commit 5fe615a4d66f4dea48812ed9e4f250010a8f9298.
---
procfs/netfs.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/procfs/netfs.c b/procfs/netfs.c
index 737abbc..276c57c 100644
--- a/procfs/netfs.c
+++ b/procfs/netfs.c
@@ -161,8 +161,6 @@ error_t netfs_get_dirents (struct iouser *cred, struct node
*dir,
vm_size_t bufsize, int *amt)
{
char *contents;
- char *first_content; // Keep pointer to the dir content's buffer to free it
- // at the end of the procedure
ssize_t contents_len;
error_t err;
@@ -172,7 +170,6 @@ error_t netfs_get_dirents (struct iouser *cred, struct node
*dir,
err = procfs_get_contents (dir, &contents, &contents_len);
if (err)
return err;
- first_content = contents;
/* We depend on the fact that CONTENTS is terminated. */
assert (contents_len == 0 || contents[contents_len - 1] == '\0');
@@ -191,10 +188,7 @@ error_t netfs_get_dirents (struct iouser *cred, struct
node *dir,
{
char *n = mmap (0, *datacnt, PROT_READ | PROT_WRITE, MAP_ANONYMOUS, 0,
0);
if (n == MAP_FAILED)
- {
- free (first_content);
- return ENOMEM;
- }
+ return ENOMEM;
*data = n;
}
@@ -202,7 +196,6 @@ error_t netfs_get_dirents (struct iouser *cred, struct node
*dir,
/* Do the actual conversion. */
*amt = putentries (contents, contents_len, nentries, *data, datacnt);
- free (first_content);
return 0;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] annotated tag upstream/hurd/0.5.git20150208 created (now 45cd7fe), Samuel Thibault, 2015/02/09
- [hurd] 13/37: Make sure to free content dir in procfs, Samuel Thibault, 2015/02/09
- [hurd] 14/37: Revert "Make sure to free content dir in procfs",
Samuel Thibault <=
- [hurd] 20/37: libshouldbeinlibc: Fix typo in local variable name, Samuel Thibault, 2015/02/09
- [hurd] 15/37: lib*: Fix typos in comments (found by codespell), Samuel Thibault, 2015/02/09
- [hurd] 11/37: hurd: make the protected payload changes less intrusive, Samuel Thibault, 2015/02/09
- [hurd] 23/37: random: fix typo, Samuel Thibault, 2015/02/09
- [hurd] 21/37: procfs: Fix typos in comments (found by codespell), Samuel Thibault, 2015/02/09
- [hurd] 25/37: libdiskfs: fix port leak, Samuel Thibault, 2015/02/09
- [hurd] 17/37: console-client: Fix typos in comments, Samuel Thibault, 2015/02/09
- [hurd] 27/37: startup: give the tasks we create a name, Samuel Thibault, 2015/02/09
- [hurd] 33/37: Remove unimplemented -s option, Samuel Thibault, 2015/02/09
- [hurd] 19/37: misc: Fix typos in comments (found by codespell), Samuel Thibault, 2015/02/09