summaryrefslogtreecommitdiffstats
path: root/src/file_spf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-01-29 08:53:42 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-01-29 08:53:42 +0100
commit77f095422316289af374a59423e3f0ccc9602ed3 (patch)
tree0e41c6bcd5e0bba49ea3bb3c7429f05a59cab6d0 /src/file_spf.c
parenta48dbbd42593f8ab889ad3fe678b5d67a2a824b7 (diff)
Fix a few memory leaks found using Coccinelle, http://www.emn.fr/x-info/coccinelle/
Diffstat (limited to 'src/file_spf.c')
-rw-r--r--src/file_spf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/file_spf.c b/src/file_spf.c
index 027bdba..2fdf07f 100644
--- a/src/file_spf.c
+++ b/src/file_spf.c
@@ -74,7 +74,10 @@ static void file_check_spf(file_recovery_t *file_recovery)
unsigned char*buffer;
buffer=(unsigned char*)MALLOC(READ_SIZE);
if(fseek(file_recovery->handle, 0, SEEK_SET)<0)
+ {
+ free(buffer);
return;
+ }
file_recovery->file_size=0;
while(1)
{