summaryrefslogtreecommitdiff
path: root/lib/names-cache.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed memory allocation bug in name cache path codeMartin Mares2015-01-221-1/+1
|
* Fix small memory leak in names-cacheMartin Mares2014-12-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tomáš Chvátal <tchvatal@suse.cz> --- lib/names-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/names-cache.c b/lib/names-cache.c index 90a6454..c97ea30 100644 --- a/lib/names-cache.c +++ b/lib/names-cache.c @@ -39,7 +39,8 @@ static char *get_cache_name(struct pci_access *a) buf = pci_malloc(a, strlen(pw->pw_dir) + strlen(name+1) + 1); sprintf(buf, "%s%s", pw->pw_dir, name+1); pci_set_param_internal(a, "net.cache_name", buf, 0); - return buf; + pci_mfree(buf); + return pci_get_param(a, "net.cache_name"); } int -- 2.1.3
* Do not include <pwd.h> et al. unless PCI_USE_DNSMartin Mares2009-09-161-6/+6
| | | | Solves compilation problems on Windows.
* Renamed `net.cache_path' to `net.cache_name', it's more logical.Martin Mares2008-02-121-4/+4
|
* Settings of the resolving and caching mechanism are now passed as parameters.Martin Mares2008-02-121-34/+38
|
* Writes to the cache file are no longer racy.Martin Mares2008-02-111-2/+25
|
* Use DNS on all architectures except AIX.Martin Mares2008-02-111-7/+24
|
* Split handling of the ID list to several files.Martin Mares2008-02-111-0/+159