csync: Fix possible null pointer dereferences in tree walkers.

CID: 1032801
CID: 1032804

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Klaas Freitag 2013-07-10 15:04:56 +02:00 committed by Andreas Schneider
parent 0876c18ec9
commit 4be88b68cc

View file

@ -624,9 +624,9 @@ int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int
{
c_rbtree_t *tree = NULL;
ctx->status_code = CSYNC_STATUS_OK;
if (ctx != NULL) {
ctx->status_code = CSYNC_STATUS_OK;
if( ctx ) {
tree = ctx->remote.tree;
}
return _csync_walk_tree(ctx, tree, visitor, filter);
@ -639,9 +639,9 @@ int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int fi
{
c_rbtree_t *tree = NULL;
ctx->status_code = CSYNC_STATUS_OK;
if (ctx != NULL) {
ctx->status_code = CSYNC_STATUS_OK;
if( ctx ) {
tree = ctx->local.tree;
}
return _csync_walk_tree(ctx, tree, visitor, filter);