summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-05 19:06:31 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-05 19:06:31 +0000
commit6b0cbb31153e482d306dae2af647c43ba4919b87 (patch)
tree332c49744c9136e8088b24ea0e62cf55ecc55c37
parentfe1975bcae657f585b370ada3bfaf44e4d277c02 (diff)
downloadldetect-6b0cbb31153e482d306dae2af647c43ba4919b87.tar
ldetect-6b0cbb31153e482d306dae2af647c43ba4919b87.tar.gz
ldetect-6b0cbb31153e482d306dae2af647c43ba4919b87.tar.bz2
ldetect-6b0cbb31153e482d306dae2af647c43ba4919b87.tar.xz
ldetect-6b0cbb31153e482d306dae2af647c43ba4919b87.zip
(set_default_alias_file) plug a small memleak
introduced in 226763 by blino on 2007-08-31 ("avoid a useless alloc + free")
-rw-r--r--modalias.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/modalias.c b/modalias.c
index 29646e3..eb33423 100644
--- a/modalias.c
+++ b/modalias.c
@@ -59,8 +59,10 @@ static void set_default_alias_file(void) {
(!stat(fallback_aliases, &st_fallback) && st_fallback.st_mtime > st_alias.st_mtime)) {
free(aliasfilename);
aliasdefault = fallback_aliases;
+ free(aliasfilename);
} else {
aliasdefault = aliasfilename;
+ free(fallback_aliases);
}
}
}