Commit 7af86f03 authored by Rich Prohaska's avatar Rich Prohaska

fix an errno leak in the deserialize code. closes #670

git-svn-id: file:///svn/tokudb@3335 c7de825b-a66e-492c-adef-691d508d4ae1
parent ff20a6cd
...@@ -215,7 +215,7 @@ int toku_deserialize_brtnode_from (int fd, DISKOFF off, BRTNODE *brtnode, unsign ...@@ -215,7 +215,7 @@ int toku_deserialize_brtnode_from (int fd, DISKOFF off, BRTNODE *brtnode, unsign
int i; int i;
u_int32_t datasize; u_int32_t datasize;
int r; int r;
if (errno!=0) { if (result==0) {
r=errno; r=errno;
if (0) { died0: toku_free(result); } if (0) { died0: toku_free(result); }
return r; return r;
...@@ -234,7 +234,7 @@ int toku_deserialize_brtnode_from (int fd, DISKOFF off, BRTNODE *brtnode, unsign ...@@ -234,7 +234,7 @@ int toku_deserialize_brtnode_from (int fd, DISKOFF off, BRTNODE *brtnode, unsign
} }
rc.buf=toku_malloc(datasize); rc.buf=toku_malloc(datasize);
//printf("%s:%d errno=%d\n", __FILE__, __LINE__, errno); //printf("%s:%d errno=%d\n", __FILE__, __LINE__, errno);
if (errno!=0) { if (rc.buf==0) {
if (0) { died1: toku_free(rc.buf); } if (0) { died1: toku_free(rc.buf); }
r=errno; r=errno;
goto died0; goto died0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment