aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/package.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 316c576..76720dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-0.9.9g Jan 14, 2005
+0.9.9g Jan 15, 2005
+ * added missing free for getline buffer in get_md5sum() and update_pkg_cache()
* fixed exclude parsing regression, adding any trailing commas
* added --compile script to FAQ, contributed by Piotr Simon
* added missing free for tmp required_of_required_by pkg_list structure in
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{