Fix horrible, horrible memmory leak. I wondered why processes were dying !

This commit is contained in:
Glenn L McGrath 2001-04-21 10:26:15 +00:00
parent 89dc02d944
commit ee0d93ed04

View File

@ -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);