Skip to content

Commit

Permalink
Problem: _recv from socket can leak zlist_t objects.
Browse files Browse the repository at this point in the history
Solution: destroy the previous zlist, if any.
  • Loading branch information
jdiez17 committed Jul 6, 2016
1 parent 4ca8a24 commit 7300fb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/zproto_codec_c.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ $(class.name)_recv ($(class.name)_t *self, zsock_t *input)
{
size_t list_size;
GET_NUMBER4 (list_size);
zlist_destroy (&self->$(name));
self->$(name) = zlist_new ();
zlist_autofree (self->$(name));
while (list_size--) {
Expand Down

0 comments on commit 7300fb1

Please sign in to comment.