aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-16 02:25:16 +0000
committerJason Woodward2005-01-16 02:25:16 +0000
commit4232425126c65c8e4bd3b706e07913576337f5ce (patch)
tree77fcfb466b2ee74860e592d5200fd8548e1b42d1 /src
parent0a0f56512f654940c9218c3b51fcdef396c05839 (diff)
downloadslapt-get-4232425126c65c8e4bd3b706e07913576337f5ce.tar.gz
added missing free for getline buffer in get_md5sum() and update_pkg_cache()
Diffstat (limited to 'src')
-rw-r--r--src/package.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c
index 2d56d2b..8941476 100644
--- a/src/package.c
+++ b/src/package.c
@@ -792,6 +792,7 @@ void get_md5sum(pkg_info_t *pkg,FILE *checksum_file){
}
}
+ if( getline_buffer ) free(getline_buffer);
#if DEBUG == 1
printf("%s-%s@%s = %s\n",pkg->name,pkg->version,pkg->location,md5_sum);
#endif
@@ -1762,6 +1763,7 @@ int update_pkg_cache(const rc_config *global_config){
while( (bytes_read = getline(&getline_buffer,&getline_len,pkg_list_fh_tmp) ) != EOF ){
fprintf(pkg_list_fh,"%s",getline_buffer);
}
+ if( getline_buffer ) free(getline_buffer);
fclose(pkg_list_fh);
}else{