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

xar_extract_tobuffer does not free the returned buffer when an error occured. #43

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

That's not really an error.
It just would be smarter if xar_extract_tobuffersz() did something like this:

int err = xar_arcmod_extract(x,f,NULL,*buffer,*size);
if (err != 0) {
  *size = 0;
  free(buffer);
  *buffer = NULL;
}
return err;

It would remove the need to to it in each caller.

Original issue reported on code.google.com by jddu...@gmail.com on 16 Oct 2007 at 7:24

@GoogleCodeExporter
Copy link
Author

Excellent suggestion, this has been resolved with commit 189.

Original comment by bbraun on 16 Oct 2007 at 7:18

  • Changed state: Fixed

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

No branches or pull requests

1 participant