Skip to content

gzip.deflate memory leak #14

Description

@dmich

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions