mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Fix horrible, horrible memmory leak. I wondered why processes were dying !
This commit is contained in:
parent
89dc02d944
commit
ee0d93ed04
@ -1,4 +1,4 @@
|
|||||||
//#include <stdio.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
@ -12,7 +12,6 @@ extern char *read_package_field(const char *package_buffer)
|
|||||||
int buffer_length = 0;
|
int buffer_length = 0;
|
||||||
|
|
||||||
buffer_length = strlen(package_buffer);
|
buffer_length = strlen(package_buffer);
|
||||||
field = xcalloc(1, buffer_length + 1);
|
|
||||||
|
|
||||||
while ((field = strchr(&package_buffer[field_length], '\n')) != NULL) {
|
while ((field = strchr(&package_buffer[field_length], '\n')) != NULL) {
|
||||||
field_length = buffer_length - strlen(field);
|
field_length = buffer_length - strlen(field);
|
||||||
|
Loading…
Reference in New Issue
Block a user