diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-04-21 10:26:15 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-04-21 10:26:15 +0000 |
commit | ee0d93ed04b608ae128ac18c89f0057eb0eb5ee4 (patch) | |
tree | 9a3ecc28412e4c53402f97d6e010375e9f731a32 /libbb | |
parent | 89dc02d94480ffc10e81d91f3c17ddff25530f18 (diff) |
Fix horrible, horrible memmory leak. I wondered why processes were dying !
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/read_package_field.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/read_package_field.c b/libbb/read_package_field.c index 4ba0bc602..246285f8e 100644 --- a/libbb/read_package_field.c +++ b/libbb/read_package_field.c @@ -1,4 +1,4 @@ -//#include <stdio.h> +#include <stdlib.h> #include <string.h> #include "libbb.h" @@ -12,7 +12,6 @@ extern char *read_package_field(const char *package_buffer) int buffer_length = 0; buffer_length = strlen(package_buffer); - field = xcalloc(1, buffer_length + 1); while ((field = strchr(&package_buffer[field_length], '\n')) != NULL) { field_length = buffer_length - strlen(field); |