waveto/node-compress — Issue #14: gzip.deflate memory leak
Author: dmich
Created: 2011-12-21 00:50:07+00:00
State: open

we see a memory leaks in gzip.deflate. Are there any known issues?
Also question (why you never delete the temporary buffer allocated at line 154?)
154	char* buf = new char[len];
155	ssize_t written = DecodeWrite(buf, len, args[0], enc);
156	assert(written == len);
157
158	char* out;
159	int out_size;
160	int r = gzip->GzipDeflate(buf, len, &out, &out_size);
161
162	if (out_size==0) {
163	return scope.Close(String::New(""));
164	}
165
166	Local outString = Encode(out, out_size, BINARY);
167	free(out);
168	return scope.Close(outString);