mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
fix an errno leak in the deserialize code. closes #670
git-svn-id: file:///svn/tokudb@3335 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
77b41b1938
commit
eaca95da94
1 changed files with 2 additions and 2 deletions
|
@ -215,7 +215,7 @@ int toku_deserialize_brtnode_from (int fd, DISKOFF off, BRTNODE *brtnode, unsign
|
|||
int i;
|
||||
u_int32_t datasize;
|
||||
int r;
|
||||
if (errno!=0) {
|
||||
if (result==0) {
|
||||
r=errno;
|
||||
if (0) { died0: toku_free(result); }
|
||||
return r;
|
||||
|
@ -234,7 +234,7 @@ int toku_deserialize_brtnode_from (int fd, DISKOFF off, BRTNODE *brtnode, unsign
|
|||
}
|
||||
rc.buf=toku_malloc(datasize);
|
||||
//printf("%s:%d errno=%d\n", __FILE__, __LINE__, errno);
|
||||
if (errno!=0) {
|
||||
if (rc.buf==0) {
|
||||
if (0) { died1: toku_free(rc.buf); }
|
||||
r=errno;
|
||||
goto died0;
|
||||
|
|
Loading…
Add table
Reference in a new issue