Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rd_kafka_conf leak #6

Closed
ygrek opened this issue Mar 10, 2016 · 1 comment
Closed

rd_kafka_conf leak #6

ygrek opened this issue Mar 10, 2016 · 1 comment

Comments

@ygrek
Copy link

ygrek commented Mar 10, 2016

  if (conf_err) {
     rd_kafka_conf_destroy(conf);
     RAISE(RD_KAFKA_CONF_RES(conf_err), "Failed to configure new kafka consumer (%s)", error_msg);
  }

  rd_kafka_t *handler = rd_kafka_new(RD_KAFKA_CONSUMER, conf, error_msg, sizeof(error_msg));
  if (handler == NULL) {
     RAISE(RD_KAFKA_RESP_ERR__FAIL, "Failed to create new kafka consumer (%s)", error_msg);
  }

this leaks rd_kafka_conf when rd_kafka_new fails

@didier-wenzek
Copy link
Owner

Thanks. I added the missing rd_kafka_conf_destroy (plus another in ocaml_kafka_new_producer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants