aboutsummaryrefslogtreecommitdiff
path: root/src/wal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wal.c')
-rw-r--r--src/wal.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/wal.c b/src/wal.c
index 0a3657c3b..9bc1660ad 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -694,10 +694,8 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
nByte = sizeof(WalIterator) + (nSegment-1)*sizeof(struct WalSegment) + 512;
p = (WalIterator *)sqlite3_malloc(nByte);
if( !p ){
- return SQLITE_NOMEM;
- }
-
- if( p ){
+ rc = SQLITE_NOMEM;
+ }else{
memset(p, 0, nByte);
p->nSegment = nSegment;
@@ -718,7 +716,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
}
*pp = p;
- return SQLITE_OK;
+ return rc;
}
/*