Skip to content

Commit

Permalink
Fix memory leak in #get_acl().
Browse files Browse the repository at this point in the history
  • Loading branch information
neilconway committed Jan 28, 2011
1 parent 19cf138 commit 570b504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/zookeeper_c.c
Expand Up @@ -400,12 +400,12 @@ static VALUE method_get_acl(VALUE self, VALUE reqid, VALUE path, VALUE async) {
break;
}

// do we need to deallocate the strings in the acl vector????
VALUE output = rb_ary_new();
rb_ary_push(output, INT2FIX(rc));
if (IS_SYNC(call_type) && rc == ZOK) {
rb_ary_push(output, zkrb_acl_vector_to_ruby(&acls));
rb_ary_push(output, zkrb_stat_to_rarray(&stat));
deallocate_ACL_vector(&acls);
}
return output;
}
Expand Down

0 comments on commit 570b504

Please sign in to comment.