1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Arg. I hate the "if (xxx) return foo" all on one line style of code.

Fix the talloc leaks I introduced by not spotting these returns.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 31 05:19:34 CEST 2011 on sn-devel-104
This commit is contained in:
Jeremy Allison 2011-03-30 19:27:29 -07:00
parent 21193c8eeb
commit 7cd5a79cd4

View File

@ -190,13 +190,19 @@ _PUBLIC_ size_t smb_iconv(smb_iconv_t cd,
if (cd->pull(cd->cd_pull,
inbuf, inbytesleft, &bufp1, &bufsize) == -1
&& errno != E2BIG) return -1;
&& errno != E2BIG) {
talloc_free(cvtbuf);
return -1;
}
bufsize = SMB_ICONV_BUFSIZE - bufsize;
if (cd->push(cd->cd_push,
&bufp2, &bufsize,
outbuf, outbytesleft) == -1) return -1;
outbuf, outbytesleft) == -1) {
talloc_free(cvtbuf);
return -1;
}
}
talloc_free(cvtbuf);
}