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:
Rich Prohaska 2008-04-07 15:54:58 +00:00
parent 77b41b1938
commit eaca95da94

View file

@ -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;