diff options
author | Ondrej Holy <oholy@redhat.com> | 2015-03-09 12:41:43 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2015-03-09 12:41:43 +0100 |
commit | 26c3dc3986760483625262a4a3564f1696f829b3 (patch) | |
tree | dc49fa3227f09a702d00c4e134ee2250e0594af6 /metadata | |
parent | e8180f4a675e6166261edbd847c08bf725d42047 (diff) | |
download | gvfs-26c3dc3986760483625262a4a3564f1696f829b3.tar.gz |
metatree: always clear fd to -1
meta_tree_clear clears fd to 0 currently, however it should be set to -1
to avoid risk that fd 0 is closed, when meta_tree_clear is called twice.
https://bugzilla.gnome.org/show_bug.cgi?id=598561
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/metatree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/metadata/metatree.c b/metadata/metatree.c index 0fe29a1b..4c6d5f00 100644 --- a/metadata/metatree.c +++ b/metadata/metatree.c @@ -258,7 +258,7 @@ meta_tree_clear (MetaTree *tree) if (tree->fd != -1) { close (tree->fd); - tree->fd = 0; + tree->fd = -1; } } |