* libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Fixed leaking
iouser and peropen structs on error.
---
libnetfs/trans-callback.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index 3f1aee6..ed21aa2
James Clarke, on Sun 07 Feb 2016 23:13:06 +, wrote:
> > On 7 Feb 2016, at 23:10, Samuel Thibault wrote:
> > Flávio Cruz, on Sun 07 Feb 2016 23:57:25 +0100, wrote:
> >> Maybe here we should do it as follows:
> >>
> >> err = errno;
> >> netfs_release_peropen (po);
> >> iohelp_free_iouser (user)
> On 7 Feb 2016, at 23:10, Samuel Thibault wrote:
> Flávio Cruz, on Sun 07 Feb 2016 23:57:25 +0100, wrote:
>> Maybe here we should do it as follows:
>>
>> err = errno;
>> netfs_release_peropen (po);
>> iohelp_free_iouser (user);
>> return err;
>
> Yes, you never know what they could be doing to
Flávio Cruz, on Sun 07 Feb 2016 23:57:25 +0100, wrote:
> Maybe here we should do it as follows:
>
> err = errno;
> netfs_release_peropen (po);
> iohelp_free_iouser (user);
> return err;
Yes, you never know what they could be doing to errno.
Samuel
Thanks for noticing!
> @@ -79,6 +82,7 @@ _netfs_translator_callback2_fn (void *cookie1, void
> *cookie2, int flags,
> }
>else
> {
> + netfs_release_peropen (po);
>iohelp_free_iouser (user);
>return errno;
> }
Maybe here we should do it as follows:
err =
* libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Fixed leaking
iouser and peropen structs on error.
---
libnetfs/trans-callback.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index 3f1aee6..7816bd1 10064
On 7 Feb 2016, at 14:51, Flavio Cruz wrote:
> - cred = netfs_make_protid (netfs_make_peropen (node, flags, cookie2),
> - user);
> + po = netfs_make_peropen (node, flags, cookie2);
> + if (! po)
> +return errno;
You need to free user.
James
signature.asc
Descript
Flavio Cruz, on Sun 07 Feb 2016 09:51:24 -0500, wrote:
> * libnetfs/trans-callback.c: Add check for netfs_make_peropen.
pushed, thanks!
* libnetfs/trans-callback.c: Add check for netfs_make_peropen.
---
libnetfs/trans-callback.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index f4f0c62..9ebe11c 100644
--- a/libnetfs/trans-callback.c
+++ b/libnetf
Flavio Cruz, on Sun 07 Feb 2016 09:19:38 -0500, wrote:
> + po = netfs_make_peropen (node, flags, cookie2);
> + if (! po)
> +return ENOMEM;
I'd say rather return errno.
Samuel
* libnetfs/trans-callback.c: Add check.
---
libnetfs/trans-callback.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index f4f0c62..9ebe11c 100644
--- a/libnetfs/trans-callback.c
+++ b/libnetfs/trans-callback.c
@@ -
* ftpfs/ftpfs.h: Add dir_locp for each directory entry and replace the table
with a libihash table.
* ftpfs/dir.c: Modify the code to use libihash. Remove several functions such
as rehash and insert.
---
ftpfs/dir.c | 142 --
ftpfs/ftpfs.
Quoting Flavio Cruz (2016-02-07 07:33:00)
> * libnetfs/netfs.h: Use refcount_t.
> * libnetfs/make-peropen.c: Initialize to 1 with refcount_init just like in
> libdiskfs.
> * libnetfs/make-protid.c: Don't increment the count here. Do it like
> libdiskfs.
> * libnetfs/io-duplicate.c: Add refcount_r
Quoting Flavio Cruz (2016-02-07 08:04:34)
> * libfshelp/locks.h: Remove.
> * libfshelp/trans.h: Remove. struct transboot is not used anywhere.
> * libfshelp/fetch-root.c: Adjust includes.
> * libfshelp/lock-acquire.c: Likewise.
> * libfshelp/lock-init.c: Likewise.
Merged, thanks!
Justus
* libfshelp/locks.h: Remove.
* libfshelp/trans.h: Remove. struct transboot is not used anywhere.
* libfshelp/fetch-root.c: Adjust includes.
* libfshelp/lock-acquire.c: Likewise.
* libfshelp/lock-init.c: Likewise.
---
libfshelp/fetch-root.c | 9 ++---
libfshelp/lock-acquire.c | 5 -
lib
* libnetfs/netfs.h: Use refcount_t.
* libnetfs/make-peropen.c: Initialize to 1 with refcount_init just like in
libdiskfs.
* libnetfs/make-protid.c: Don't increment the count here. Do it like libdiskfs.
* libnetfs/io-duplicate.c: Add refcount_ref since netfs_make_protid no longer
increments the re
* vm/vm_external.h (struct vm_external): Remove unused field
'existence_count'.
---
vm/vm_external.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/vm/vm_external.h b/vm/vm_external.h
index 55c9e48..4e44ddf 100644
--- a/vm/vm_external.h
+++ b/vm/vm_external.h
@@ -46,9 +46,14 @@ typedef s
* vm/vm_external.c (vm_external_create): Allocate a large map for all
objects larger than SMALL_SIZE. 'vm_external_state_{g,s}et' can deal
with offsets larger than 'LARGE_SIZE', so currently objects larger
than 'LARGE_SIZE' are missing out on the optimization.
---
vm/vm_external.c | 2 +-
1 file
* vm/vm_external.c (vm_external_create): Initialize allocated maps.
---
vm/vm_external.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vm/vm_external.c b/vm/vm_external.c
index 7584a2b..6e71918 100644
--- a/vm/vm_external.c
+++ b/vm/vm_external.c
@@ -74,6 +74,7 @@ vm_external_t vm_external_c
19 matches
Mail list logo