Fixing memory leak

This commit is contained in:
wbaumann 2014-05-04 14:29:35 +00:00
parent b71f3b65b4
commit a2798b241a
5 changed files with 53 additions and 119 deletions

16
AUTHORS
View File

@ -1,28 +1,18 @@
davfs2 AUTHORS 2009-11-09
davfs2 AUTHORS 2014-04-21
-------------------------

This package is based on davfs2 0.2.3 by
Sun Kim <hunkim@cs.ucsc.edu> and
Robert Spier <robrt@users.sourceforge.net>.
This version is a complete rewrite by Werner Baumann.

The kernel interface definitions are copyright by
Miklos Szeredi and Carnegie Mellon University, respectively
(license text below).

The files in the gl directory are from Gnulib
(http://www.gnu.org/software/gnulib/) and usually under GPL,
Copyright (C) Free Software Foundation. You should look at the
copyright notices of individual files before distributing them.

The files in the config directory are from the GNU Autotools
and Gnulib. Each file has a short copyright notice.
Miklos Szeredi and Carnegie Mellon University, respectively.


Copyright:
==========

Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010
Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
Werner Baumann <werner.baumann@onlinehome.de>

davfs2 is free software; you can redistribute it and/or modify

View File

@ -1,6 +1,10 @@
ChangeLog for davfs2
--------------------

2014-05-04 Werner Baumann (werner.baumann@onlinehome.de)
* cache.c, update_cache_file:
Fixing memory leak.

2014-04-20 Werner Baumann (werner.baumann@onlinehome.de)
* defaults.h, mount_davfs.h, mount_davfs.c, cache.c:
Add option minimize_mem (sr #108158).

40
README
View File

@ -1,7 +1,7 @@
2010-04-30
----------

# Copyright (C) 2006, 2007, 2008, 2009, 2010 Werner Baumann
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2014 Werner Baumann

# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty.
@ -132,22 +132,30 @@ Nevertheless davfs2 insists on verification of server certificates. There
are three ways to do this:

- davfs2 will use the CA-certificates of your system to verify the server
certificate.
certificate. The server's certificate must be valid and host-name of the
server must match the subject-alt-name or the common name of the certificate.

- You may store the server certificate in the certs directory and add a
configuration option to davfs2.conf. You will have to verify this certificate
by your own, as davfs2 will trust this certificate without further
verification. This should be useful with self-made server certificates.
If the server certificate is not self-signed, but signed by an unknown
CA, the certificate file must contain the server certificate and the
certificate of all the involved CA's.
- You may store a top-level CA-certificate in the certs directory and set
option trust_ca_cert in the davfs2.conf directory. This CA-certificate will
be used instead of the CA-certificates provided by your system. he server's
certificate must be valid and host-name of the server must match the
subject-alt-name or the common name of the certificate.
This is useful when the service provider uses a private CA or the server
certificate is self-signed.

- The host-name of the server must match the subject-alt-name or the common
name of the certificate.
- You may store the certificate of the server and set option trust_server_cert
in the davfs2.conf file. In this case the certificate of the server must
exactly match this certificate, but it does not matter whether it is valid,
outdated or does not match the server's host-name.

- If a certificate can not be verified, mount.davfs will print information
about the certificate and ask the user. This will only be done, before
mount.davfs changes into daemon mode.
When you use option trust_ca_cert or trust_server_cert it is your responsibility
to get the certificate in a reliable way and care for certificate revocation.
If you can do this it is more secure then relying of well known certificate
authorities (considering recent events).

If a certificate can not be verified, mount.davfs will print information about
the certificate and ask the user. This will only be done before mount.davfs
changes into daemon mode.


5 CACHE
@ -197,8 +205,8 @@ software, to search for the reason:
- You may set option 'debug most" in the davfs2.conf file. This will print a
lot of debug messages in one of your log files.

- Wireshark (former Ethereal) will log and analyse the traffic between davfs2
and the server. (http://www.wireshark.org/)
- Wireshark will log and analyse the traffic between davfs2 and the server.
(http://www.wireshark.org/)

- If you have access to the server's log files, they contain valuable
information.

108
THANKS
View File

@ -1,92 +1,22 @@
davfs2 THANKS 2010-04-30
davfs2 THANKS 2014-04-21
------------------------

Thanks to all the people that contributed by sending patches
and bug reports, patiently testing and hunting bugs,
and giving good advise.
============================================================
This file used to contain a list of contributers. But this list never was
complete and I am not able to keep track of contributions.

So I wand to thank all the people who helped in one or another way:

- By sending reports about problems.

- By running debug sessions.

- By sending patches for bug fixes or new teatures.

- By providing all the libraries that davfs2 uses directly or indirectly.

- By providing all the tools used to create this program.

- By providing the free GNU/Linux operating system.
Werner Baumann
Dirk Arend <d.arend@avm.de>
Reto Bachmann-Gmuer <rebach@users.sourceforge.net>
Adrian Bridgett
Anthony Baxter <anthonybaxter@users.sourceforge.net>
Dan Armbrust <daniel.armbrust.list@gmail.com>
Luciano Bello <lbello@users.sourceforge.net>
Vladimir Bormotov <bormotov@users.sourceforge.net>
butchie55 <butchie55@users.sourceforge.net>
Grahame Bowland <grahame@fugro-fsi.com.au>
Ross Campbell <ross@users.sourceforge.net>
Laurent Cottereau <lcottereau@users.sourceforge.net>
Stephen Coursen <scoursen@users.sourceforge.net>
DeltaPiSF <deltapisf@users.sourceforge.net>
Daniel Drucker <placain@users.sourceforge.net>
Paul eater <eater@users.sourceforge.net>
Andrei Emeltchenko andrei.emeltchenko.news@gmail.com
Jan Engelhardt <jengelh@users.sourceforge.net>
Joe Feise <jfeise@users.sourceforge.net>
Peter Fern <savannah@obfusc8.org>
Toralf Förster <toralf_foerster@users.sourceforge.net>
Justin Gombos <jgombos@users.sourceforge.net>
Bob Glickstein <bglickstein@users.sourceforge.net>
Joao Gouveia <jgouveia@users.sourceforge.net>
Yeon Gyoung <mips942@users.sourceforge.net>
Jason Haar <jhaar@trimble.co.nz>
Philipp Hahn <pmhahn@users.sourceforge.net>
Jan Harkes <jaharkes@cs.cmu.edu>
Martin Higham <martin@ocasta.co.uk>
Lauri Kaila <laurikaila@users.sourceforge.net>
Hyunsop Kim <hskim@taegu.ac.kr>
Vítězslav Kotrla <vitko@post.cz>
Alexander Jenisch <enti@users.sourceforge.net>
joe <josephb@users.sourceforge.net>
Simon Kainz <simon@familiekainz.at>
Doug Kelly <dougk@dougk-ff7.net>
Thomas Kemmer <tkemmer@users.sourceforge.net>
SungHun Kim <hunkim@users.sourceforge.net>
Alan Knowles <alan_k@users.sourceforge.net>
Moriyoshi Koizumi <moriyoshi@users.sourceforge.net>
Martin F. Krafft <madduck@debian.org>
Masar <masarlabs@users.sourceforge.net>
monstruooo <monstruooo@users.sourceforge.net>
Muthu Kumar <kmkumar@users.sourceforge.net>
Scott Lamb <slamb@users.sourceforge.net>
Erik Lat <erik.lat@htbindustries.org>
Andreas Lauser <andlaus@users.sourceforge.net>
Holger Librenz <me@holger-librenz.de>
Reddy T. Mahesh <tmahesh@users.sourceforge.net>
Juergen P. Messerer <messi@users.sourceforge.net>
Arkadiusz Miskiewicz <arekm@users.sourceforge.net>
Johannes Müller <s9186231@mail.zih.tu-dresden.de>
Andre Naujoks <nautsch2@googlemail.com>
Maik Nijhuis <manyac@users.sourceforge.net>
Joseph Wayne Norton <natsukashi@users.sourceforge.net>
Tim Olsen <tim@brooklynpenguin.com>
Jan Ortgies <design@mediaworldgmbh.de>
Joe Orton <joe@manyfish.co.uk>
Panu Outinen <poutinen@users.sourceforge.net>
Tero Pelander <tpeland2@users.sourceforge.net>
Ruediger Pluem <ruediger.pluem@vodafone.com>
Gauvain Pocentek <gauvain@ulteo.com>
David Popeck <dpopeck@users.sourceforge.net>
Sean Reifschneider <jafo@users.sourceforge.net>
Sebastian Reitenbach <buzzdee@users.sourceforge.net>
Daniel Roche <danroche@users.sourceforge.net>
Carl D. Roth <carlroth@users.sourceforge.net>
James Russell <russej@users.sourceforge.net>
Martin Samuelsson <cosis@users.sourceforge.net>
Enrico Scelsa <enrichicco@users.sourceforge.net>
Patrick Schipper <pqschipper@users.sourceforge.net>
Hans Schulz <hans@vega.demon.nl>
Tim Skirvin <tim_skirvin@users.sourceforge.net>
Ville Skyttä <scop@users.sourceforge.net>
Robert Spier <robrt@users.sourceforge.net>
Steven Stanek <sstanek@covariable.com>
Geoffroy Stévenne <geoffroys@users.sourceforge.net>
Greg Stein <gstein@lyra.org>
Tomi <farago1@zonnet.nl>
Lars Uffmann <lu@cachescrubber.org>
Björn Voigt <bjoernv@users.sourceforge.net>
Dag Wieers <dag@wieers.com>
Jim Whitehead <ejw@cse.ucsc.edu>
Will Woods <wwoods@redhat.com>
Marcin Zajączkowski <mszpak@wp.pl>

View File

@ -2603,7 +2603,8 @@ update_cache_file(dav_node *node)
ret = dav_get_file(node->path, node->cache_path, &node->size, &etag,
&smtime, NULL);
if (!ret) {
node->etag = etag;
if (node->etag) free(node->etag);
node->etag = etag;
if (smtime) {
node->atime = smtime;
node->mtime = smtime;
@ -2618,6 +2619,7 @@ update_cache_file(dav_node *node)
node->parent->utime = 0;
remove_node(node);
}
if (etag) free(etag);
delete_cache_file(node);
}
}