diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-08-17 09:30:49 +0200 |
---|---|---|
committer | Markus Elfring <elfring@users.sourceforge.net> | 2015-08-17 09:30:49 +0200 |
commit | dc4ebc0787a299f064553e6d28a7f35574ce1c2a (patch) | |
tree | 1b939ceaa089de170270b26982088515fbade6d5 /src/journal | |
parent | f00ef7f5d43980e82ed7caa1ac3530b3713cbd76 (diff) |
Bug #944: Deletion of unnecessary checks before calls of the function "free"
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first
This issue was fixed by using the software Coccinelle 1.0.1.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journal-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index f7815b2796..4f94799ce7 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -169,7 +169,7 @@ void journal_file_close(JournalFile *f) { #ifdef HAVE_GCRYPT if (f->fss_file) munmap(f->fss_file, PAGE_ALIGN(f->fss_file_size)); - else if (f->fsprg_state) + else free(f->fsprg_state); free(f->fsprg_seed); |