From: Martin Mares Date: Thu, 22 Jan 2015 21:44:49 +0000 (+0100) Subject: Fixed memory allocation bug in name cache path code X-Git-Tag: v3.3.1~5 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=7220de95783ce262abc805779c76f727f86ae0e0;p=pciutils.git Fixed memory allocation bug in name cache path code --- diff --git a/lib/names-cache.c b/lib/names-cache.c index c97ea30..ba5de6d 100644 --- a/lib/names-cache.c +++ b/lib/names-cache.c @@ -38,7 +38,7 @@ 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); + pci_set_param_internal(a, "net.cache_name", buf, 1); pci_mfree(buf); return pci_get_param(a, "net.cache_name"); }