summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath2001-04-21 10:26:15 +0000
committerGlenn L McGrath2001-04-21 10:26:15 +0000
commitee0d93ed04b608ae128ac18c89f0057eb0eb5ee4 (patch)
tree9a3ecc28412e4c53402f97d6e010375e9f731a32
parent89dc02d94480ffc10e81d91f3c17ddff25530f18 (diff)
downloadbusybox-ee0d93ed04b608ae128ac18c89f0057eb0eb5ee4.zip
busybox-ee0d93ed04b608ae128ac18c89f0057eb0eb5ee4.tar.gz
Fix horrible, horrible memmory leak. I wondered why processes were dying !
-rw-r--r--libbb/read_package_field.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/read_package_field.c b/libbb/read_package_field.c
index 4ba0bc6..246285f 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);