aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2003-10-09 23:59:54 +0000
committerJason Woodward2003-10-09 23:59:54 +0000
commitd3e3c241c9931a720162b8bdb76e68d0420794d2 (patch)
tree4393297031a00a9c5a5d7c66c8b92de7cc7f8021
parentfb55336b6316c49bb53b34453aae7c122179f625 (diff)
downloadslapt-get-d3e3c241c9931a720162b8bdb76e68d0420794d2.tar.gz
changed malloc back to calloc (src/package.c, line 423)
-rw-r--r--ChangeLog3
-rw-r--r--src/package.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e20164b..4c19deb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
-0.9.5d Oct 08, 2003
+0.9.5d Oct 09, 2003
* added initial slack-required for future dependancy support
* added lilo to example slapt-getrc exclude list
* improved regex within package.h
@@ -9,6 +9,7 @@
* formatting updates
* actually call regfree() for all regex_t
* introduced a DO_NOT_UNLINK_BAD_FILES macro within include/main.h
+ * changed malloc back to calloc (src/package.c, line 423)
0.9.5c Oct 04, 2003
* removed bad free() in get_installed_pkgs()
diff --git a/src/package.c b/src/package.c
index 88379a4..c963bad 100644
--- a/src/package.c
+++ b/src/package.c
@@ -420,9 +420,10 @@ struct pkg_list *get_update_pkgs(void){
);
if( up_regex.reg_return == 0 ){
- list->pkgs[list->pkg_count] = malloc( sizeof *list->pkgs[list->pkg_count] );
+ /* find out why malloc isn't working here... mem leak somewhere */
+ list->pkgs[list->pkg_count] = calloc( 1, sizeof *list->pkgs[list->pkg_count] );
if( list->pkgs[list->pkg_count] == NULL ){
- fprintf(stderr,"Failed to malloc list->pkgs[list->pkg_count]\n");
+ fprintf(stderr,"Failed to calloc list->pkgs[list->pkg_count]\n");
exit(1);
}