diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-05 19:06:31 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-05 19:06:31 +0000 |
commit | 6b0cbb31153e482d306dae2af647c43ba4919b87 (patch) | |
tree | 332c49744c9136e8088b24ea0e62cf55ecc55c37 | |
parent | fe1975bcae657f585b370ada3bfaf44e4d277c02 (diff) | |
download | ldetect-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } } } |