From: Glenn L McGrath Date: Sat, 21 Apr 2001 10:26:15 +0000 (-0000) Subject: Fix horrible, horrible memmory leak. I wondered why processes were dying ! X-Git-Tag: 0_52~318 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ee0d93ed04b608ae128ac18c89f0057eb0eb5ee4;p=oweals%2Fbusybox.git Fix horrible, horrible memmory leak. I wondered why processes were dying ! --- 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 +#include #include #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);