diff options
author | Roy Marples <roy@marples.name> | 2007-10-12 00:01:33 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-12 00:01:33 +0000 |
commit | 20a149b2c7bfd7e53d24d0665281c083d7362c67 (patch) | |
tree | b195111871b8e05c584b71aed066c3990c5db2b3 /src/librc-depend.c | |
parent | e3bc6666d6d5bd8922ca10652a2d04577357fa71 (diff) |
malloc over fatty buffers
Diffstat (limited to 'src/librc-depend.c')
-rw-r--r-- | src/librc-depend.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librc-depend.c b/src/librc-depend.c index 62ceaac7..c00f4fa8 100644 --- a/src/librc-depend.c +++ b/src/librc-depend.c @@ -667,7 +667,7 @@ bool rc_deptree_update (void) rc_deptype_t *deptype = NULL; rc_deptype_t *dt; rc_deptype_t *last_deptype = NULL; - char buffer[RC_LINEBUFFER]; + char *buffer = NULL; int len; int i; int j; @@ -685,6 +685,7 @@ bool rc_deptree_update (void) deptree = xmalloc (sizeof (rc_depinfo_t)); memset (deptree, 0, sizeof (rc_depinfo_t)); + buffer = xmalloc (sizeof (char) * RC_LINEBUFFER); memset (buffer, 0, RC_LINEBUFFER); /* Phase 2 */ @@ -776,6 +777,7 @@ bool rc_deptree_update (void) } pclose (fp); + free (buffer); /* Phase 3 - add our providors to the tree */ for (depinfo = deptree; depinfo; depinfo = depinfo->next) |